1
0

hw wallets: define SUPPORTED_XTYPES for each plugin

This commit is contained in:
SomberNight
2018-05-09 18:17:49 +02:00
parent dc2f8ee804
commit c133e00590
4 changed files with 15 additions and 5 deletions

View File

@@ -78,6 +78,7 @@ class KeepKeyPlugin(HW_PluginBase):
libraries_URL = 'https://github.com/keepkey/python-keepkey'
minimum_firmware = (1, 0, 0)
keystore_class = KeepKey_KeyStore
SUPPORTED_XTYPES = ('standard', )
MAX_LABEL_LEN = 32
@@ -235,8 +236,8 @@ class KeepKeyPlugin(HW_PluginBase):
client.used()
def get_xpub(self, device_id, derivation, xtype, wizard):
if xtype not in ('standard',):
raise ScriptTypeNotSupported(_('This type of script is not supported with KeepKey.'))
if xtype not in self.SUPPORTED_XTYPES:
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