From 166b0359834306447651ab20a68d20703612d28e Mon Sep 17 00:00:00 2001 From: tecnovert Date: Thu, 30 May 2024 22:35:43 +0200 Subject: [PATCH] ui: Fix more info view for Decred HTLC bids. --- basicswap/interface/dcr/dcr.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/basicswap/interface/dcr/dcr.py b/basicswap/interface/dcr/dcr.py index 27e4b9a..7628100 100644 --- a/basicswap/interface/dcr/dcr.py +++ b/basicswap/interface/dcr/dcr.py @@ -1315,6 +1315,17 @@ class DCRInterface(Secp256k1Interface): ofs += 1 return tx.vin[0].signature_script[ofs: ofs + sig_len] + def listInputs(self, tx_bytes: bytes): + tx = self.loadTx(tx_bytes) + + all_locked = self.rpc_wallet('listlockunspent') + inputs = [] + for txi in tx.vin: + txid_hex = i2h(txi.prevout.hash) + islocked = any([txid_hex == a['txid'] and txi.prevout.n == a['vout'] for a in all_locked]) + inputs.append({'txid': txid_hex, 'vout': txi.prevout.n, 'islocked': islocked}) + return inputs + def unlockInputs(self, tx_bytes): tx = self.loadTx(tx_bytes)