From 82c21bc30d943aa63f436558a362529579fa28ad Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 16 Jan 2024 11:45:20 +0100 Subject: [PATCH] wizard: take hardware_device from correct location for cosigners. fixes #8808 --- electrum/gui/qt/wizard/wallet.py | 4 ++++ electrum/wizard.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/wizard/wallet.py b/electrum/gui/qt/wizard/wallet.py index 32c74d0b6..b90cbce11 100644 --- a/electrum/gui/qt/wizard/wallet.py +++ b/electrum/gui/qt/wizard/wallet.py @@ -1335,7 +1335,9 @@ class WCHWXPub(WalletWizardComponent, Logger): self.ok_l = WWLabel(_('Hardware keystore added to wallet')) self.ok_l.setAlignment(Qt.AlignCenter) + self.layout().addStretch(1) self.layout().addWidget(self.ok_l) + self.layout().addStretch(1) def on_ready(self): cosigner_data = self.wizard.current_cosigner(self.wizard_data) @@ -1412,7 +1414,9 @@ class WCHWUninitialized(WalletWizardComponent): _name, _info = cosigner_data['hardware_device'] label = WWLabel(_('This {} is not initialized. Use manufacturer tooling to initialize the device.').format(_info.model_name)) label.setAlignment(Qt.AlignCenter) + self.layout().addStretch(1) self.layout().addWidget(label) + self.layout().addStretch(1) def apply(self): pass diff --git a/electrum/wizard.py b/electrum/wizard.py index 227cef317..b693446e4 100644 --- a/electrum/wizard.py +++ b/electrum/wizard.py @@ -322,7 +322,8 @@ class NewWalletWizard(AbstractWizard): return 'wallet_password' def on_hardware_device(self, wizard_data: dict, new_wallet=True) -> str: - _type, _info = wizard_data['hardware_device'] + current_cosigner = self.current_cosigner(wizard_data) + _type, _info = current_cosigner['hardware_device'] run_hook('init_wallet_wizard', self) # TODO: currently only used for hww, hook name might be confusing plugin = self.plugins.get_plugin(_type) return plugin.wizard_entry_for_device(_info, new_wallet=new_wallet)