Browse Source

wizard: take hardware_device from correct location for cosigners. fixes #8808

master
Sander van Grieken 2 years ago
parent
commit
82c21bc30d
No known key found for this signature in database
GPG Key ID: 9BCF8209EA402EBA
  1. 4
      electrum/gui/qt/wizard/wallet.py
  2. 3
      electrum/wizard.py

4
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

3
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)

Loading…
Cancel
Save