Skip to content

Commit

Permalink
cosigner pool: easy fix (works but with worse than previous behaviour)
Browse files Browse the repository at this point in the history
got broken as part of PSBT changes in #5721
  • Loading branch information
SomberNight committed Feb 7, 2020
1 parent 4313bde commit 34392e8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions electrum/plugins/cosigner_pool/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,10 @@ def transaction_dialog_update(self, d: 'TxDialog'):
d.cosigner_send_button.setVisible(False)

def cosigner_can_sign(self, tx: Transaction, cosigner_xpub: str) -> bool:
if not isinstance(tx, PartialTransaction):
return False
if tx.is_complete():
return False
# TODO this is broken currently as it assumes tx.xpubs
return cosigner_xpub in {bip32node.to_xpub() for bip32node in tx.xpubs}
# TODO implement this properly:
# should return True iff cosigner (with given xpub) can sign and has not yet signed.
# note that tx could also be unrelated from wallet?... (not ismine inputs)
return True

def do_send(self, tx: Union[Transaction, PartialTransaction]):
def on_success(result):
Expand Down

0 comments on commit 34392e8

Please sign in to comment.