mirror of
https://github.com/basicswap/basicswap.git
synced 2025-04-06 14:27:30 +00:00
Swaps in Progress fixes.
This commit is contained in:
parent
0cf77a4854
commit
42d8abbc92
2 changed files with 18 additions and 13 deletions
basicswap
|
@ -996,12 +996,16 @@ def js_active(self, url_split, post_string, is_json) -> bytes:
|
|||
"received",
|
||||
]
|
||||
all_bids = []
|
||||
processed_bid_ids = set()
|
||||
|
||||
try:
|
||||
received_bids = swap_client.listBids(filters=filters)
|
||||
sent_bids = swap_client.listBids(sent=True, filters=filters)
|
||||
for bid in received_bids + sent_bids:
|
||||
try:
|
||||
bid_id_hex = bid[2].hex()
|
||||
if bid_id_hex in processed_bid_ids:
|
||||
continue
|
||||
bid_state = strBidState(bid[5])
|
||||
tx_state_a = strTxState(bid[7])
|
||||
tx_state_b = strTxState(bid[8])
|
||||
|
@ -1011,7 +1015,7 @@ def js_active(self, url_split, post_string, is_json) -> bytes:
|
|||
if not offer:
|
||||
continue
|
||||
swap_data = {
|
||||
"bid_id": bid[2].hex(),
|
||||
"bid_id": bid_id_hex,
|
||||
"offer_id": bid[3].hex(),
|
||||
"created_at": bid[0],
|
||||
"bid_state": bid_state,
|
||||
|
@ -1031,6 +1035,7 @@ def js_active(self, url_split, post_string, is_json) -> bytes:
|
|||
},
|
||||
}
|
||||
all_bids.append(swap_data)
|
||||
processed_bid_ids.add(bid_id_hex)
|
||||
except Exception:
|
||||
continue
|
||||
except Exception:
|
||||
|
|
|
@ -42,21 +42,21 @@
|
|||
<span class="text-sm text-gray-600 dark:text-gray-300 font-semibold">Details</span>
|
||||
</div>
|
||||
</th>
|
||||
<th class="p-0">
|
||||
<div class="py-3 px-4 bg-coolGray-200 dark:bg-gray-600 text-left">
|
||||
<span class="text-sm text-gray-600 dark:text-gray-300 font-semibold">You Send</span>
|
||||
</div>
|
||||
</th>
|
||||
<th class="p-0">
|
||||
<div class="py-3 px-4 bg-coolGray-200 dark:bg-gray-600 text-center">
|
||||
<span class="text-sm text-gray-600 dark:text-gray-300 font-semibold">Swap</span>
|
||||
</div>
|
||||
</th>
|
||||
<th class="p-0">
|
||||
<th class="p-0">
|
||||
<div class="py-3 px-4 bg-coolGray-200 dark:bg-gray-600 text-right">
|
||||
<span class="text-sm text-gray-600 dark:text-gray-300 font-semibold">You Receive</span>
|
||||
</div>
|
||||
</th>
|
||||
</th>
|
||||
<th class="p-0">
|
||||
<div class="py-3 px-4 bg-coolGray-200 dark:bg-gray-600 text-center">
|
||||
<span class="text-sm text-gray-600 dark:text-gray-300 font-semibold">Swap</span>
|
||||
</div>
|
||||
</th>
|
||||
<th class="p-0">
|
||||
<div class="py-3 px-4 bg-coolGray-200 dark:bg-gray-600 text-left">
|
||||
<span class="text-sm text-gray-600 dark:text-gray-300 font-semibold">You Send</span>
|
||||
</div>
|
||||
</th>
|
||||
<th class="p-0">
|
||||
<div class="py-3 px-4 bg-coolGray-200 dark:bg-gray-600 text-center">
|
||||
<span class="text-sm text-gray-600 dark:text-gray-300 font-semibold">Status</span>
|
||||
|
|
Loading…
Reference in a new issue