Browse Source

wizard: also push final state on the stack

master
Sander van Grieken 2 years ago
parent
commit
2407fab178
  1. 12
      electrum/wizard.py

12
electrum/wizard.py

@ -66,11 +66,14 @@ class AbstractWizard:
else:
raise Exception(f'accept handler for view {view} is not callable')
is_finished = False
if 'next' not in nav:
# finished
self.finished(wizard_data)
return WizardViewState(None, wizard_data, {})
is_finished = True
# self.finished(wizard_data)
# return WizardViewState(None, wizard_data, {})
new_view = WizardViewState(None, wizard_data, {})
else:
view_next = nav['next']
if isinstance(view_next, str):
# string literal
@ -99,6 +102,9 @@ class AbstractWizard:
self.log_stack()
if is_finished:
self.finished(wizard_data)
return new_view
def resolve_prev(self):

Loading…
Cancel
Save