Skip to content

Commit

Permalink
Merge #516: Return status indicating if we signed the PSBT
Browse files Browse the repository at this point in the history
c7f70a0 Report back whether we were able to sign psbt, rather than having to compare two long base64 strings by eye. (barrystyle)

Pull request description:

  Report back whether we were able to sign PSBT, rather than having to compare two long base64 strings by eye; which can be very frustrating during multiple debug sessions.

ACKs for top commit:
  achow101:
    ACK c7f70a0

Tree-SHA512: cf458df62abfe6d49b6d472759370d037177b5d9c530e5af229bd15f875816fbe9c795b4a5849d48285e6ae56e52325e80a25cd7e768fce13998132e947d9ef0
  • Loading branch information
achow101 committed Oct 22, 2021
2 parents 583c4a4 + c7f70a0 commit 8ec8e1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hwilib/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ def signtx(client: HardwareWalletClient, psbt: str) -> Dict[str, str]:
# Deserialize the transaction
tx = PSBT()
tx.deserialize(psbt)
return {"psbt": client.sign_tx(tx).serialize()}
result = client.sign_tx(tx).serialize()
return {"psbt": result, "signed": result != psbt}

def getxpub(client: HardwareWalletClient, path: str, expert: bool = False) -> Dict[str, Any]:
"""
Expand Down

0 comments on commit 8ec8e1b

Please sign in to comment.