1
0

hardware wallets: pass xtype to get_xpub

This commit is contained in:
ThomasV
2017-10-31 11:45:25 +01:00
parent 1ecfcea8dc
commit f36024e216
8 changed files with 26 additions and 34 deletions

View File

@@ -1673,7 +1673,7 @@ class Simple_Deterministic_Wallet(Simple_Wallet, Deterministic_Wallet):
def load_keystore(self):
self.keystore = load_keystore(self.storage, 'keystore')
try:
xtype = deserialize_xpub(self.keystore.xpub)[0]
xtype = bitcoin.xpub_type(self.keystore.xpub)
except:
xtype = 'standard'
self.txin_type = 'p2pkh' if xtype == 'standard' else xtype
@@ -1737,7 +1737,7 @@ class Multisig_Wallet(Deterministic_Wallet):
name = 'x%d/'%(i+1)
self.keystores[name] = load_keystore(self.storage, name)
self.keystore = self.keystores['x1/']
xtype = deserialize_xpub(self.keystore.xpub)[0]
xtype = bitcoin.xpub_type(self.keystore.xpub)
self.txin_type = 'p2sh' if xtype == 'standard' else xtype
def save_keystore(self):