wizzard: ensure ensure `on_wizard_complete` is called
This commit is contained in:
parent
23fe2062a1
commit
f33fbefce0
|
@ -495,17 +495,19 @@ class RestoreSeedDialog(CreateAccountDialog):
|
|||
tis._keyboard.bind(on_key_down=self.on_key_down)
|
||||
stepper = self.ids.stepper
|
||||
stepper.opacity = 1
|
||||
stepper.source = 'atlas://gui/kivy/theming/light/stepper_restore_seed'
|
||||
stepper.source = ('atlas://gui/kivy/theming"
|
||||
"/light/stepper_restore_seed')
|
||||
self._back = _back = partial(self.ids.back.dispatch, 'on_release')
|
||||
app.navigation_higherarchy.append(_back)
|
||||
|
||||
def on_key_down(self, keyboard, keycode, key, modifiers):
|
||||
if keycode[1] == 'enter':
|
||||
self.on_enter()
|
||||
return True
|
||||
#super
|
||||
|
||||
def on_enter(self):
|
||||
self._remove_keyboard()
|
||||
#self._remove_keyboard()
|
||||
# press next
|
||||
self.ids.next.dispatch('on_release')
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ class InstallWizard(Widget):
|
|||
wallet.start_threads(self.network)
|
||||
|
||||
if not mode == 'restore':
|
||||
return
|
||||
return self.dispatch('on_wizard_complete', wallet)
|
||||
|
||||
def get_text(text):
|
||||
def set_text(*l): app.info_bubble.ids.lbl.text=text
|
||||
|
@ -311,7 +311,7 @@ class InstallWizard(Widget):
|
|||
app.show_info(_("Recovery successful"))
|
||||
else:
|
||||
app.show_info(_("No transactions found for this seed"))
|
||||
self.dispatch('on_wizard_complete', wallet)
|
||||
return self.dispatch('on_wizard_complete', wallet)
|
||||
|
||||
self.waiting_dialog(lambda: wallet.restore(get_text),
|
||||
on_complete=on_complete)
|
||||
|
|
|
@ -158,8 +158,8 @@ class ElectrumWindow(App):
|
|||
def on_wizard_complete(self, instance, wallet):
|
||||
if not wallet:
|
||||
Logger.debug('Electrum: No Wallet set/found. Exiting...')
|
||||
self.stop()
|
||||
sys.exit()
|
||||
app.show_error('Electrum: No Wallet set/found. Exiting...',
|
||||
exit=True)
|
||||
return
|
||||
|
||||
# plugins that need to change the GUI do it here
|
||||
|
|
Loading…
Reference in New Issue