Reload xmr swaps in-progress.

This commit is contained in:
tecnovert
2020-12-04 23:30:20 +02:00
parent e7afd5e67d
commit 28d5848f3a
11 changed files with 152 additions and 145 deletions

View File

@@ -11,6 +11,7 @@ import urllib.parse
from .util import format8
from .basicswap import (
strBidState,
SwapTypes,
)
from .ui import (
PAGE_LIMIT,
@@ -109,7 +110,11 @@ def js_bids(self, url_split, post_string):
if addr_from == '-1':
addr_from = None
bid_id = swap_client.postBid(offer_id, amount_from, addr_send_from=addr_from).hex()
offer = swap_client.getOffer(offer_id)
if offer and offer.swap_type == SwapTypes.XMR_SWAP:
bid_id = swap_client.postXmrBid(offer_id, amount_from, addr_send_from=addr_from).hex()
else:
bid_id = swap_client.postBid(offer_id, amount_from, addr_send_from=addr_from).hex()
rv = {'bid_id': bid_id}
return bytes(json.dumps(rv), 'UTF-8')