mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-07 11:18:10 +01:00
Show coin a lock tx blocks confirmed.
This commit is contained in:
@@ -152,7 +152,10 @@ def describeBid(swap_client, bid, offer, edit_bid, show_txns):
|
||||
if offer.swap_type == SwapTypes.XMR_SWAP:
|
||||
txns = []
|
||||
if bid.xmr_a_lock_tx:
|
||||
txns.append({'type': 'Chain A Lock', 'txid': bid.xmr_a_lock_tx.txid.hex()})
|
||||
confirms = None
|
||||
if swap_client.coin_clients[ci_from.coin_type()]['last_height'] and bid.xmr_a_lock_tx.chain_height:
|
||||
confirms = swap_client.coin_clients[ci_from.coin_type()]['last_height'] - bid.xmr_a_lock_tx.chain_height
|
||||
txns.append({'type': 'Chain A Lock', 'txid': bid.xmr_a_lock_tx.txid.hex(), 'confirms': confirms})
|
||||
if bid.xmr_a_lock_spend_tx:
|
||||
txns.append({'type': 'Chain A Lock Spend', 'txid': bid.xmr_a_lock_spend_tx.txid.hex()})
|
||||
if bid.xmr_b_lock_tx:
|
||||
@@ -162,7 +165,6 @@ def describeBid(swap_client, bid, offer, edit_bid, show_txns):
|
||||
txns.append({'type': 'Chain B Lock', 'txid': bid.xmr_b_lock_tx.txid.hex(), 'confirms': confirms})
|
||||
if bid.xmr_b_lock_tx and bid.xmr_b_lock_tx.spend_txid:
|
||||
txns.append({'type': 'Chain B Lock Spend', 'txid': bid.xmr_b_lock_tx.spend_txid.hex()})
|
||||
|
||||
for tx_type, tx in bid.txns.items():
|
||||
txns.append({'type': strTxType(tx_type), 'txid': tx.txid.hex()})
|
||||
data['txns'] = txns
|
||||
|
||||
Reference in New Issue
Block a user