hw wallets: introduce HardwareHandlerBase
previously, client.handler was sometimes - an InstallWizard - a QtHandlerBase where win was an ElectrumWindow - a QtHandlerBase where win was an InstallWizard - a CmdLineHandler That's just too much dynamic untyped undocumented polymorphism... Now it will never be an InstallWizard (replaced with QtHandlerBase where win is an InstallWizard), and now in all cases client.handler is an instance of HardwareHandlerBase, yay. related: #6063
This commit is contained in:
@@ -282,7 +282,6 @@ class KeepKeyPlugin(HW_PluginBase):
|
||||
if client is None:
|
||||
raise UserFacingException(_('Failed to create a client for this device.') + '\n' +
|
||||
_('Make sure it is in the correct state.'))
|
||||
# fixme: we should use: client.handler = wizard
|
||||
client.handler = self.create_handler(wizard)
|
||||
if not device_info.initialized:
|
||||
self.initialize_device(device_id, wizard, client.handler)
|
||||
@@ -294,7 +293,7 @@ class KeepKeyPlugin(HW_PluginBase):
|
||||
raise ScriptTypeNotSupported(_('This type of script is not supported with {}.').format(self.device))
|
||||
devmgr = self.device_manager()
|
||||
client = devmgr.client_by_id(device_id)
|
||||
client.handler = wizard
|
||||
client.handler = self.create_handler(wizard)
|
||||
xpub = client.get_xpub(derivation, xtype)
|
||||
client.used()
|
||||
return xpub
|
||||
|
||||
Reference in New Issue
Block a user