mirror of
https://github.com/basicswap/basicswap.git
synced 2025-02-02 03:06:30 +00:00
ui: Fix error when txid is unknown.
This commit is contained in:
parent
811fa15f26
commit
4030dc9858
1 changed files with 2 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
||||||
import json
|
import json
|
||||||
import struct
|
import struct
|
||||||
from basicswap.util import (
|
from basicswap.util import (
|
||||||
|
hex_or_none,
|
||||||
make_int,
|
make_int,
|
||||||
format_timestamp,
|
format_timestamp,
|
||||||
)
|
)
|
||||||
|
@ -303,7 +304,7 @@ def describeBid(swap_client, bid, xmr_swap, offer, xmr_offer, bid_events, edit_b
|
||||||
confirms = None
|
confirms = None
|
||||||
if swap_client.coin_clients[ci_leader.coin_type()]['chain_height'] and bid.xmr_a_lock_tx.chain_height:
|
if swap_client.coin_clients[ci_leader.coin_type()]['chain_height'] and bid.xmr_a_lock_tx.chain_height:
|
||||||
confirms = (swap_client.coin_clients[ci_leader.coin_type()]['chain_height'] - bid.xmr_a_lock_tx.chain_height) + 1
|
confirms = (swap_client.coin_clients[ci_leader.coin_type()]['chain_height'] - bid.xmr_a_lock_tx.chain_height) + 1
|
||||||
txns.append({'type': 'Chain A Lock', 'txid': bid.xmr_a_lock_tx.txid.hex(), 'confirms': confirms})
|
txns.append({'type': 'Chain A Lock', 'txid': hex_or_none(bid.xmr_a_lock_tx.txid), 'confirms': confirms})
|
||||||
if bid.xmr_a_lock_spend_tx:
|
if bid.xmr_a_lock_spend_tx:
|
||||||
txns.append({'type': 'Chain A Lock Spend', 'txid': bid.xmr_a_lock_spend_tx.txid.hex()})
|
txns.append({'type': 'Chain A Lock Spend', 'txid': bid.xmr_a_lock_spend_tx.txid.hex()})
|
||||||
if bid.xmr_b_lock_tx:
|
if bid.xmr_b_lock_tx:
|
||||||
|
|
Loading…
Reference in a new issue