electrum

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

commit 387c2a1acda7e4de708e2a3cc0ed2b58c6305736
parent d4fc73e2b498f86e040698ea276477e1880f9be0
Author: SomberNight <somber.night@protonmail.com>
Date:   Mon,  2 Mar 2020 06:12:24 +0100

kivy wallet info screen: handle "show seed" for watch-only/no-seed case

For a watch-only wallet, previously a superfluous dummy "Tap to show"
box was shown.
For a has no seed stored (but not watch-only) wallet (e.g. bip39/xprv/imported_privkeys),
the "show seed" option was there and it raised an uncaught exception.

Diffstat:
Melectrum/gui/kivy/main.kv | 3+++
Melectrum/gui/kivy/uix/ui_screens/status.kv | 5+++--
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/electrum/gui/kivy/main.kv b/electrum/gui/kivy/main.kv @@ -148,6 +148,9 @@ font_size: '6pt' name: '' data: '' + visible: True + opacity: 1 if self.visible else 0 + disabled: not self.visible text: self.data if self.data else _('Tap to show') touched: False padding: '10dp', '10dp' diff --git a/electrum/gui/kivy/uix/ui_screens/status.kv b/electrum/gui/kivy/uix/ui_screens/status.kv @@ -63,12 +63,13 @@ Popup: data: app.wallet.get_master_public_key() or 'None' name: _('Master Public Key') TopLabel: - text: _('This wallet is watching-only') if root.watching_only else _('Seed') + text: _('This wallet is watching-only') if root.watching_only else (_('Seed') if root.has_seed else _('No seed stored for wallet')) RefLabel: id: seed_label + visible: root.has_seed data: '' name: _('Seed') - on_touched: if not self.data and not root.watching_only: app.show_seed(seed_label) + on_touched: if not self.data and root.has_seed: app.show_seed(seed_label) BoxLayout: size_hint: 1, None