1
0

fix #2133: deserialize_xkey

This commit is contained in:
ThomasV
2017-01-23 20:49:26 +01:00
parent f2b208429d
commit 132fca86b2
4 changed files with 24 additions and 36 deletions

View File

@@ -129,7 +129,7 @@ class Plugin(BasePlugin):
self.cosigner_list = []
for key, keystore in wallet.keystores.items():
xpub = keystore.get_master_public_key()
K = bitcoin.deserialize_xkey(xpub)[-1].encode('hex')
K = bitcoin.deserialize_xpub(xpub)[-1].encode('hex')
_hash = bitcoin.Hash(K).encode('hex')
if not keystore.is_watching_only():
self.keys.append((key, _hash, window))
@@ -203,7 +203,7 @@ class Plugin(BasePlugin):
if not xprv:
return
try:
k = bitcoin.deserialize_xkey(xprv)[-1].encode('hex')
k = bitcoin.deserialize_xprv(xprv)[-1].encode('hex')
EC = bitcoin.EC_KEY(k.decode('hex'))
message = EC.decrypt_message(message)
except Exception as e: