1
0

Merge pull request #3683 from SomberNight/wizard_scriptnotsupported

wizard: allow to choose derivation again if script type is not supported
This commit is contained in:
ThomasV
2018-01-11 16:45:55 +01:00
committed by GitHub
3 changed files with 20 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ try:
from electrum.keystore import Hardware_KeyStore
from ..hw_wallet import HW_PluginBase
from electrum.util import print_error, to_string, UserCancelled
from electrum.base_wizard import ScriptTypeNotSupported
import time
import hid
@@ -697,6 +698,8 @@ class DigitalBitboxPlugin(HW_PluginBase):
def get_xpub(self, device_id, derivation, xtype, wizard):
if xtype not in ('standard', 'p2wpkh-p2sh'):
raise ScriptTypeNotSupported(_('This type of script is not supported with the Digital Bitbox.'))
devmgr = self.device_manager()
client = devmgr.client_by_id(device_id)
client.handler = self.create_handler(wizard)

View File

@@ -10,6 +10,7 @@ from electrum.i18n import _
from electrum.plugins import BasePlugin
from electrum.transaction import deserialize
from electrum.keystore import Hardware_KeyStore, is_xpubkey, parse_xpubkey
from electrum.base_wizard import ScriptTypeNotSupported
from ..hw_wallet import HW_PluginBase
@@ -208,6 +209,8 @@ class KeepKeyCompatiblePlugin(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.'))
devmgr = self.device_manager()
client = devmgr.client_by_id(device_id)
client.handler = wizard