1
0

wizard: remove finished call, it's unused

qt: call is_finalized before closing the wizard dialog and add a check if wallet can be
    decrypted with the supplied secret (user pw, hw device)
This commit is contained in:
Sander van Grieken
2023-09-07 14:19:41 +02:00
parent dd64b5c628
commit 7fd3b6c91d
3 changed files with 32 additions and 12 deletions

View File

@@ -193,8 +193,10 @@ class QEAbstractWizard(QDialog, MessageBoxMixin):
wd = page.wizard_data.copy()
if self.is_last(wd):
self.submit(wd)
self.finished(wd)
self.accept()
if self.is_finalized(wd):
self.accept()
else:
self.prev() # rollback the submit above
else:
next = self.submit(wd)
self.load_next_component(next.view, next.wizard_data, next.params)
@@ -219,6 +221,10 @@ class QEAbstractWizard(QDialog, MessageBoxMixin):
wdata = wizard_data.copy()
return self.is_last_view(self._current.view, wdata)
def is_finalized(self, wizard_data: dict) -> bool:
''' Final check before closing the wizard. '''
return True
class WizardComponent(QWidget):
updated = pyqtSignal(object)