From 468d8c5cc1b34bb5d7e4a401101370554b67e04b Mon Sep 17 00:00:00 2001 From: tecnovert Date: Tue, 18 Oct 2022 19:59:46 +0200 Subject: [PATCH] xmr swap: Set correct block height on refund_tx. --- basicswap/basicswap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicswap/basicswap.py b/basicswap/basicswap.py index a29fc58..18c4802 100644 --- a/basicswap/basicswap.py +++ b/basicswap/basicswap.py @@ -3153,7 +3153,7 @@ class BasicSwap(BaseApp): 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) - 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']) refund_tx.block_hash = bytes.fromhex(block_header['hash']) refund_tx.block_height = block_header['height']