1
0

move xpubkey logic to keystore and fix it

This commit is contained in:
ThomasV
2016-08-17 14:28:37 +02:00
parent f6e393d7b6
commit bfd7709ccd
6 changed files with 67 additions and 55 deletions

View File

@@ -157,14 +157,13 @@ class Plugin(BasePlugin):
d.cosigner_send_button.hide()
def cosigner_can_sign(self, tx, cosigner_xpub):
from electrum.transaction import x_to_xpub
from electrum.keystore import is_xpubkey, parse_xpubkey
xpub_set = set([])
for txin in tx.inputs():
for x_pubkey in txin['x_pubkeys']:
xpub = x_to_xpub(x_pubkey)
if xpub:
if is_xpubkey(x_pubkey):
xpub, s = parse_xpubkey(x_pubkey)
xpub_set.add(xpub)
return cosigner_xpub in xpub_set
def do_send(self, tx):