|
|
|
|
@ -307,16 +307,19 @@ class BaseWizard(object):
|
|
|
|
|
self.on_keystore(k) |
|
|
|
|
|
|
|
|
|
def on_keystore(self, k): |
|
|
|
|
has_xpub = isinstance(k, keystore.Xpub) |
|
|
|
|
if has_xpub: |
|
|
|
|
from .bitcoin import xpub_type |
|
|
|
|
t1 = xpub_type(k.xpub) #fixme: old wallets |
|
|
|
|
t1 = xpub_type(k.xpub) |
|
|
|
|
if self.wallet_type == 'standard': |
|
|
|
|
if t1 not in ['standard', 'p2wpkh', 'p2wpkh-p2sh']: |
|
|
|
|
if has_xpub and t1 not in ['standard', 'p2wpkh', 'p2wpkh-p2sh']: |
|
|
|
|
self.show_error(_('Wrong key type') + ' %s'%t1) |
|
|
|
|
self.run('choose_keystore') |
|
|
|
|
return |
|
|
|
|
self.keystores.append(k) |
|
|
|
|
self.run('create_wallet') |
|
|
|
|
elif self.wallet_type == 'multisig': |
|
|
|
|
assert has_xpub |
|
|
|
|
if t1 not in ['standard', 'p2wsh', 'p2wsh-p2sh']: |
|
|
|
|
self.show_error(_('Wrong key type') + ' %s'%t1) |
|
|
|
|
self.run('choose_keystore') |
|
|
|
|
|