xmr swap: Set correct block height on refund_tx.

This commit is contained in:
tecnovert 2022-10-18 19:59:46 +02:00
parent 3c84f0230e
commit 468d8c5cc1
No known key found for this signature in database
GPG key ID: 8ED6D8750C4E3F93

View file

@ -3153,7 +3153,7 @@ class BasicSwap(BaseApp):
p2wsh_addr = ci_from.encode_p2wsh(a_lock_refund_tx_dest) p2wsh_addr = ci_from.encode_p2wsh(a_lock_refund_tx_dest)
lock_refund_tx_chain_info = ci_from.getLockTxHeight(refund_tx.txid, p2wsh_addr, 0, bid.chain_a_height_start) lock_refund_tx_chain_info = ci_from.getLockTxHeight(refund_tx.txid, p2wsh_addr, 0, bid.chain_a_height_start)
if lock_refund_tx_chain_info is not None: if lock_refund_tx_chain_info is not None and lock_refund_tx_chain_info.get('height', 0) > 0:
block_header = ci_from.getBlockHeaderFromHeight(lock_refund_tx_chain_info['height']) block_header = ci_from.getBlockHeaderFromHeight(lock_refund_tx_chain_info['height'])
refund_tx.block_hash = bytes.fromhex(block_header['hash']) refund_tx.block_hash = bytes.fromhex(block_header['hash'])
refund_tx.block_height = block_header['height'] refund_tx.block_height = block_header['height']