electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit bdca7be1c73d7cccd9bccd4436167e7f5fcc3869
parent bba995ada3ed3dd86c091e27ebce55e393a8683c
Author: bitromortac <bitromortac@protonmail.com>
Date:   Tue, 13 Oct 2020 19:32:54 +0200

kivy: remove enable/disable button

Diffstat:
Melectrum/gui/kivy/main_window.py | 32--------------------------------
Melectrum/gui/kivy/uix/ui_screens/status.kv | 8--------
2 files changed, 0 insertions(+), 40 deletions(-)

diff --git a/electrum/gui/kivy/main_window.py b/electrum/gui/kivy/main_window.py @@ -1199,38 +1199,6 @@ class ElectrumWindow(App, Logger): title=_("Confirm action")) d.open() - def toggle_lightning(self): - if self.wallet.has_lightning(): - if not bool(self.wallet.lnworker.channels): - warning = _('This will delete your lightning private keys') - d = Question(_('Disable Lightning?') + '\n\n' + warning, self._disable_lightning) - d.open() - else: - self.show_info('This wallet has channels') - else: - warning1 = _("Lightning support in Electrum is experimental. Do not put large amounts in lightning channels.") - warning2 = _("Funds stored in lightning channels are not recoverable from your seed. You must backup your wallet file everytime you create a new channel.") - d = Question(_('Enable Lightning?') + '\n\n' + warning1 + '\n\n' + warning2, self._enable_lightning) - d.open() - - def _enable_lightning(self, b): - if not b: - return - wallet_path = self.get_wallet_path() - self.wallet.init_lightning() - self.show_info(_('Lightning keys have been initialized.')) - self.stop_wallet() - self.load_wallet_by_name(wallet_path) - - def _disable_lightning(self, b): - if not b: - return - wallet_path = self.get_wallet_path() - self.wallet.remove_lightning() - self.show_info(_('Lightning keys have been removed.')) - self.stop_wallet() - self.load_wallet_by_name(wallet_path) - def delete_wallet(self): basename = os.path.basename(self.wallet.storage.path) d = Question(_('Delete wallet?') + '\n' + basename, self._delete_wallet) diff --git a/electrum/gui/kivy/uix/ui_screens/status.kv b/electrum/gui/kivy/uix/ui_screens/status.kv @@ -85,11 +85,3 @@ Popup: on_release: root.dismiss() app.save_backup() - Button: - size_hint: 0.5, None - height: '48dp' - disabled: not app.wallet.can_have_lightning() - text: _('Disable LN') if app.wallet.has_lightning() else _('Enable LN') - on_release: - root.dismiss() - app.toggle_lightning()