Browse Source

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.
hard-fail-on-bad-server-string
SomberNight 5 years ago
parent
commit
387c2a1acd
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 3
      electrum/gui/kivy/main.kv
  2. 5
      electrum/gui/kivy/uix/ui_screens/status.kv

3
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'

5
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

Loading…
Cancel
Save