Improve user experience once mediation has been accepted by both parties

Transitions to Trade Step 4 (previously it would close/remove the trade).
This commit is contained in:
jmacxx 2021-11-26 20:55:46 -06:00
parent 8fb8374721
commit 670c5418ee
No known key found for this signature in database
GPG key ID: 155297BABFE94A1B

View file

@ -702,7 +702,9 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi
public void closeDisputedTrade(String tradeId, Trade.DisputeState disputeState) {
getTradeById(tradeId).ifPresent(trade -> {
trade.setDisputeState(disputeState);
onTradeCompleted(trade);
trade.setState(trade.getContract().isMyRoleBuyer(keyRing.getPubKeyRing()) ?
Trade.State.BUYER_RECEIVED_PAYOUT_TX_PUBLISHED_MSG : // buyer to trade step 4
Trade.State.SELLER_SAW_ARRIVED_PAYOUT_TX_PUBLISHED_MSG); // seller to trade step 4
btcWalletService.swapTradeEntryToAvailableEntry(trade.getId(), AddressEntry.Context.TRADE_PAYOUT);
requestPersistence();
});