ui: Hide the bid abandon button.

2024-05-20_merge
tecnovert 2 years ago
parent cbb3d0ac02
commit 57554d4fec
No known key found for this signature in database
GPG Key ID: 8ED6D8750C4E3F93
  1. 3
      basicswap/basicswap.py
  2. 6
      basicswap/ui/util.py
  3. 2
      doc/release-notes.md

@ -2749,6 +2749,9 @@ class BasicSwap(BaseApp):
self.closeSession(session)
def abandonBid(self, bid_id: bytes) -> None:
if not self.debug:
self.log.error('Can\'t abandon bid %s when not in debug mode.', bid_id.hex())
return
self.log.info('Abandoning Bid %s', bid_id.hex())
self.deactivateBidForReason(bid_id, BidStates.BID_ABANDONED)

@ -231,6 +231,10 @@ def describeBid(swap_client, bid, xmr_swap, offer, xmr_offer, bid_events, edit_b
addr_label = swap_client.getAddressLabel([bid.bid_addr, ])[0]
bid_rate = offer.rate if bid.rate is None else bid.rate
can_abandon: bool = False
if swap_client.debug and bid.state not in (BidStates.BID_ABANDONED, BidStates.SWAP_COMPLETED):
can_abandon = True
data = {
'coin_from': ci_from.coin_name(),
'coin_to': ci_to.coin_name(),
@ -256,7 +260,7 @@ def describeBid(swap_client, bid, xmr_swap, offer, xmr_offer, bid_events, edit_b
'participate_tx': getTxIdHex(bid, TxTypes.PTX, ' ' + ticker_to),
'participate_conf': 'None' if (not bid.participate_tx or not bid.participate_tx.conf) else bid.participate_tx.conf,
'show_txns': show_txns,
'can_abandon': True if bid.state not in (BidStates.BID_ABANDONED, BidStates.SWAP_COMPLETED) else False,
'can_abandon': can_abandon,
'events': bid_events,
'debug_ui': swap_client.debug_ui,
}

@ -4,6 +4,8 @@
- cores: Raised Particl and Monero daemon version.
- ui: Add debug option to remove expired offers, bids and transactions.
- ui: The abandon bid button is hidden if not in debug mode.
- Abandoning a bid stops all processing.
0.0.62

Loading…
Cancel
Save