1
0

wizard: fix wizard_data instance not isolated between pages,

combine is_bip39_seed and is_slip39_seed into cosigner aware needs_derivation_path
add instance id logging to wizard.log_stack()
qt: add updated signal to SeedLayout
This commit is contained in:
Sander van Grieken
2023-08-01 14:15:28 +02:00
parent c485753ffd
commit a6caa3ffe9
4 changed files with 128 additions and 85 deletions

View File

@@ -122,7 +122,6 @@ class QEAbstractWizard(QDialog):
def update(self):
page = self.main_widget.currentWidget()
self.title.setText(page.title)
self.title.setText(f'<b>{page.title}</b>' if page.title else '')
self.back_button.setText(_('Back') if self.can_go_back() else _('Cancel'))
self.next_button.setText(_('Next') if not self.is_last(page.wizard_data) else _('Finish'))
@@ -219,3 +218,10 @@ class WizardComponent(QWidget):
def on_updated(self, *args):
self.updated.emit(self)
# returns (sub)dict of current cosigner (or root if first)
def _current_cosigner(self, wizard_data):
wdata = wizard_data
if wizard_data['wallet_type'] == 'multisig' and 'multisig_current_cosigner' in wizard_data:
cosigner = wizard_data['multisig_current_cosigner']
wdata = wizard_data['multisig_cosigner_data'][str(cosigner)]
return wdata