diff --git a/electrum/gui/qml/components/wizard/WCKeystoreType.qml b/electrum/gui/qml/components/wizard/WCKeystoreType.qml index f33cd2c00..30d5125c5 100644 --- a/electrum/gui/qml/components/wizard/WCKeystoreType.qml +++ b/electrum/gui/qml/components/wizard/WCKeystoreType.qml @@ -36,20 +36,20 @@ WizardComponent { property string keystoretype: 'haveseed' text: qsTr('I already have a seed') } - ElRadioButton { - Layout.fillWidth: true - ButtonGroup.group: keystoregroup - property string keystoretype: 'masterkey' - text: qsTr('Use a master key') - } - ElRadioButton { - Layout.fillWidth: true - enabled: false - visible: false - ButtonGroup.group: keystoregroup - property string keystoretype: 'hardware' - text: qsTr('Use a hardware device') - } + #ElRadioButton { + # Layout.fillWidth: true + # ButtonGroup.group: keystoregroup + # property string keystoretype: 'masterkey' + # text: qsTr('Use a master key') + #} + #ElRadioButton { + # Layout.fillWidth: true + # enabled: false + # visible: false + # ButtonGroup.group: keystoregroup + # property string keystoretype: 'hardware' + # text: qsTr('Use a hardware device') + #} } } diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index ef810bc8e..9546ae965 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -173,8 +173,8 @@ def __init__(self, gui_object: 'ElectrumGui', wallet: Abstract_Wallet): self.gui_thread = gui_object.gui_thread assert wallet, "no wallet" self.wallet = wallet - if wallet.has_lightning() and not self.config.cv.GUI_QT_SHOW_TAB_CHANNELS.is_set(): - self.config.GUI_QT_SHOW_TAB_CHANNELS = False # override default, but still allow disabling tab manually + #if wallet.has_lightning() and not self.config.cv.GUI_QT_SHOW_TAB_CHANNELS.is_set(): + # self.config.GUI_QT_SHOW_TAB_CHANNELS = False # override default, but still allow disabling tab manually Exception_Hook.maybe_setup(config=self.config, wallet=self.wallet) @@ -436,16 +436,16 @@ def on_event_on_quotes(self, *args): def on_event_on_history(self, *args): self.on_fx_history() - @qt_event_listener - def on_event_gossip_db_loaded(self, *args): - self.channels_list.gossip_db_loaded.emit(*args) + #@qt_event_listener + #def on_event_gossip_db_loaded(self, *args): + # self.channels_list.gossip_db_loaded.emit(*args) - @qt_event_listener - def on_event_channel(self, *args): - wallet = args[0] - if wallet == self.wallet: - self.channels_list.update_single_row.emit(*args) - self.update_status() + #qt_event_listener + #def on_event_channel(self, *args): + # wallet = args[0] + # if wallet == self.wallet: + # self.channels_list.update_single_row.emit(*args) + # self.update_status() @qt_event_listener def on_event_banner(self, *args): @@ -461,9 +461,9 @@ def on_event_verified(self, *args): def on_event_fee_histogram(self, *args): self.history_model.on_fee_histogram() - @qt_event_listener - def on_event_ln_gossip_sync_progress(self, *args): - self.update_lightning_icon() + #@qt_event_listener + #def on_event_ln_gossip_sync_progress(self, *args): + # self.update_lightning_icon() @qt_event_listener def on_event_cert_mismatch(self, *args): @@ -477,8 +477,8 @@ def close_wallet(self): @profiler def load_wallet(self, wallet: Abstract_Wallet): self.update_recently_visited(wallet.storage.path) - if wallet.has_lightning(): - util.trigger_callback('channels_updated', wallet) + #if wallet.has_lightning(): + # util.trigger_callback('channels_updated', wallet) self.need_update.set() # Once GUI has been initialized check if we want to announce something since the callback has been called before the GUI was initialized # update menus @@ -1009,7 +1009,7 @@ def update_tabs(self, wallet=None): self.address_list.update() self.utxo_list.update() self.contact_list.update() - self.channels_list.update_rows.emit(wallet) + #self.channels_list.update_rows.emit(wallet) self.update_completions() def refresh_tabs(self, wallet=None): @@ -1019,11 +1019,11 @@ def refresh_tabs(self, wallet=None): self.address_list.refresh_all() self.utxo_list.refresh_all() self.contact_list.refresh_all() - self.channels_list.update_rows.emit(self.wallet) + #self.channels_list.update_rows.emit(self.wallet) def create_channels_tab(self): - self.channels_list = ChannelsList(self) - tab = self.create_list_tab(self.channels_list) + #self.channels_list = ChannelsList(self) + #tab = self.create_list_tab(self.channels_list) tab.is_shown_cv = self.config.cv.GUI_QT_SHOW_TAB_CHANNELS return tab @@ -1058,10 +1058,10 @@ def show_transaction( ): show_transaction(tx, parent=self, external_keypairs=external_keypairs, payment_identifier=payment_identifier) - def show_lightning_transaction(self, tx_item): - from .lightning_tx_dialog import LightningTxDialog - d = LightningTxDialog(self, tx_item) - d.show() + #def show_lightning_transaction(self, tx_item): + # from .lightning_tx_dialog import LightningTxDialog + # d = LightningTxDialog(self, tx_item) + # d.show() def create_receive_tab(self): from .receive_tab import ReceiveTab @@ -1741,19 +1741,19 @@ def new_contact_dialog(self): if d.exec_(): self.set_contact(line2.text(), line1.text()) - def init_lightning_dialog(self, dialog): - assert not self.wallet.has_lightning() - if self.wallet.can_have_deterministic_lightning(): - msg = _( - "Lightning is not enabled because this wallet was created with an old version of Electrum. " - "Create lightning keys?") - else: - msg = _( - "Warning: this wallet type does not support channel recovery from seed. " - "You will need to backup your wallet everytime you create a new channel. " - "Create lightning keys?") - if self.question(msg): - self._init_lightning_dialog(dialog=dialog) + #def init_lightning_dialog(self, dialog): + # assert not self.wallet.has_lightning() + # if self.wallet.can_have_deterministic_lightning(): + # msg = _( + # "Lightning is not enabled because this wallet was created with an old version of Electrum. " + # "Create lightning keys?") + # else: + # msg = _( + # "Warning: this wallet type does not support channel recovery from seed. " + # "You will need to backup your wallet everytime you create a new channel. " + # "Create lightning keys?") + # if self.question(msg): + # self._init_lightning_dialog(dialog=dialog) @protected def _init_lightning_dialog(self, *, dialog, password): @@ -2670,4 +2670,3 @@ def on_swap_result(self, txid): else: msg += _("Lightning funds were not received.") self.show_error_signal.emit(msg) - diff --git a/electrum/gui/qt/receive_tab.py b/electrum/gui/qt/receive_tab.py index 3c4e4ff8c..01c048952 100644 --- a/electrum/gui/qt/receive_tab.py +++ b/electrum/gui/qt/receive_tab.py @@ -189,7 +189,7 @@ def expiry_dialog(self): _('The bitcoin address never expires and will always be part of this electrum wallet.'), ' ', _('You can reuse a bitcoin address any number of times but it is not good for your privacy.'), '\n\n', - _('For Lightning requests, payments will not be accepted after the expiration.'), + _('Lightning not supported.'), ]) expiry = self.config.WALLET_PAYREQ_EXPIRY_SECONDS v = self.window.query_choice(msg, pr_expiration_values, title=_('Expiry'), default_choice=expiry) @@ -207,11 +207,11 @@ def on_toggle_bolt11_fallback(self): def update_view_button(self): i = self.config.GUI_QT_RECEIVE_TABS_INDEX if i == 0: - icon, text = read_QIcon("link.png"), _('FACT0RN URI') + icon, text = read_QIcon("bitcoin.png"), _('Address') elif i == 1: icon, text = read_QIcon("bitcoin.png"), _('Address') elif i == 2: - icon, text = read_QIcon("lightning.png"), _('Lightning') + icon, text = read_QIcon("bitcoin.png"), _('Address') self.toggle_view_button.setText(text) self.toggle_view_button.setIcon(icon) @@ -283,13 +283,13 @@ def update_current_request(self): def get_tab_data(self): i = self.config.GUI_QT_RECEIVE_TABS_INDEX if i == 0: - out = self.URI, self.URI, self.URI_help, _('FACT0RN URI') + out = self.addr, self.addr, self.address_help, _('Address') elif i == 1: out = self.addr, self.addr, self.address_help, _('Address') elif i == 2: # encode lightning invoices as uppercase so QR encoding can use # alphanumeric mode; resulting in smaller QR codes - out = self.lnaddr, self.lnaddr.upper(), self.ln_help, _('Lightning Request') + out = self.addr, self.addr, self.address_help, _('Address') return out def update_receive_qr_window(self): diff --git a/electrum/gui/qt/wallet_info_dialog.py b/electrum/gui/qt/wallet_info_dialog.py index ce3901625..c930eb8ab 100644 --- a/electrum/gui/qt/wallet_info_dialog.py +++ b/electrum/gui/qt/wallet_info_dialog.py @@ -64,42 +64,7 @@ def __init__(self, parent: QWidget, *, window: 'ElectrumWindow'): ks_type = str(keystore_types[0]) if keystore_types else _('No keystore') grid.addWidget(WWLabel(ks_type), cur_row, 1) cur_row += 1 - # lightning - grid.addWidget(WWLabel(_('Lightning') + ':'), cur_row, 0) - from .util import IconLabel - if wallet.has_lightning(): - if wallet.lnworker.has_deterministic_node_id(): - grid.addWidget(WWLabel(_('Enabled')), cur_row, 1) - else: - label = IconLabel(text='Enabled, non-recoverable channels') - label.setIcon(read_QIcon('cloud_no')) - grid.addWidget(label, cur_row, 1) - if wallet.db.get('seed_type') == 'segwit': - msg = _("Your channels cannot be recovered from seed, because they were created with an old version of Electrum. " - "This means that you must save a backup of your wallet everytime you create a new channel.\n\n" - "If you want this wallet to have recoverable channels, you must close your existing channels and restore this wallet from seed") - else: - msg = _("Your channels cannot be recovered from seed. " - "This means that you must save a backup of your wallet everytime you create a new channel.\n\n" - "If you want to have recoverable channels, you must create a new wallet with an Electrum seed") - grid.addWidget(HelpButton(msg), cur_row, 3) - cur_row += 1 - grid.addWidget(WWLabel(_('Lightning Node ID:')), cur_row, 0) - cur_row += 1 - nodeid_text = wallet.lnworker.node_keypair.pubkey.hex() - nodeid_e = ShowQRLineEdit(nodeid_text, config, title=_("Node ID")) - grid.addWidget(nodeid_e, cur_row, 0, 1, 4) - cur_row += 1 - else: - if wallet.can_have_lightning(): - grid.addWidget(WWLabel('Not enabled'), cur_row, 1) - button = QPushButton(_("Enable")) - button.pressed.connect(lambda: window.init_lightning_dialog(self)) - grid.addWidget(button, cur_row, 3) - else: - grid.addWidget(WWLabel(_("Not available for this wallet.")), cur_row, 1) - grid.addWidget(HelpButton(_("Lightning is currently restricted to HD wallets with p2wpkh addresses.")), cur_row, 2) - cur_row += 1 + vbox.addLayout(grid) labels_clayout = None diff --git a/electrum/gui/qt/wizard/wallet.py b/electrum/gui/qt/wizard/wallet.py index 145d3e339..597d26779 100644 --- a/electrum/gui/qt/wizard/wallet.py +++ b/electrum/gui/qt/wizard/wallet.py @@ -390,9 +390,8 @@ def __init__(self, parent, wizard): message = _('What kind of wallet do you want to create?') wallet_kinds = [ ('standard', _('Standard wallet')), - ('2fa', _('Wallet with two-factor authentication')), ('multisig', _('Multi-signature wallet')), - ('imported', _('Import Bitcoin addresses or private keys')), + ('imported', _('Import Fact0rn addresses or private keys')), ] choices = [pair for pair in wallet_kinds if pair[0] in wallet_types] @@ -412,8 +411,8 @@ def __init__(self, parent, wizard): choices = [ ('createseed', _('Create a new seed')), ('haveseed', _('I already have a seed')), - ('masterkey', _('Use a master key')), - ('hardware', _('Use a hardware device')) + # ('masterkey', _('Use a master key')), + # ('hardware', _('Use a hardware device')) ] self.choice_w = ChoiceWidget(message=message, choices=choices) @@ -922,7 +921,7 @@ def apply(self): class WCImport(WizardComponent): def __init__(self, parent, wizard): - WizardComponent.__init__(self, parent, wizard, title=_('Import Bitcoin Addresses or Private Keys')) + WizardComponent.__init__(self, parent, wizard, title=_('Import Fact0rn Addresses or Private Keys')) message = _( 'Enter a list of Bitcoin addresses (this will create a watching-only wallet), or a list of private keys.') header_layout = QHBoxLayout() diff --git a/electrum/simple_config.py b/electrum/simple_config.py index 9d9c403be..e53203a91 100644 --- a/electrum/simple_config.py +++ b/electrum/simple_config.py @@ -1105,10 +1105,12 @@ def _default_swapserver_url(self) -> str: short_desc=lambda: _('Zeros after decimal point'), long_desc=lambda: _('Number of zeros displayed after the decimal point. For example, if this is set to 2, "1." will be displayed as "1.00"'), ) - BTC_AMOUNTS_PREC_POST_SAT = ConfigVar( - 'amt_precision_post_satoshi', default=0, type_=int, - short_desc=lambda: _("Show Lightning amounts with msat precision"), + + BTC_AMOUNTS_PREC_POST_SAT = ConfigVar( + 'amt_precision_post_satoshi', default=0, type_=int, + short_desc=lambda: _("Lightning precision (not supported)."), ) + BTC_AMOUNTS_ADD_THOUSANDS_SEP = ConfigVar( 'amt_add_thousands_sep', default=False, type_=bool, short_desc=lambda: _("Add thousand separators to bitcoin amounts"),