slip39: follow-ups
- fix kivy wizard restore-from-seed - qt seed dialog: disable "next share" if current share is invalid - fix tests: file paths should not depend on $PWD (working dir)
This commit is contained in:
@@ -989,7 +989,8 @@ class RestoreSeedDialog(WizardDialog):
|
||||
tis.focus = False
|
||||
|
||||
def get_params(self, b):
|
||||
return (self.get_text(), self.is_bip39, self.is_ext)
|
||||
seed_type = 'bip39' if self.is_bip39 else 'electrum'
|
||||
return (self.get_text(), seed_type, self.is_ext)
|
||||
|
||||
|
||||
class ConfirmSeedDialog(RestoreSeedDialog):
|
||||
|
||||
@@ -302,7 +302,12 @@ class SeedLayout(QVBoxLayout):
|
||||
self.prev_share_btn.show()
|
||||
self.next_share_btn.show()
|
||||
self.prev_share_btn.setEnabled(self.slip39_mnemonic_index != 0)
|
||||
self.next_share_btn.setEnabled(self.slip39_mnemonic_index < len(self.slip39_mnemonics) - 1 or (bool(self.seed_e.text().strip()) and not finished))
|
||||
self.next_share_btn.setEnabled(
|
||||
# already pressed "prev" and undoing that:
|
||||
self.slip39_mnemonic_index < len(self.slip39_mnemonics) - 1
|
||||
# finished entering latest share and starting new one:
|
||||
or (bool(self.seed_e.text().strip()) and not self.slip39_current_mnemonic_invalid and not finished)
|
||||
)
|
||||
|
||||
def on_prev_share(self):
|
||||
if not self.slip39_mnemonics[self.slip39_mnemonic_index]:
|
||||
|
||||
Reference in New Issue
Block a user