Skip to content

Commit

Permalink
Merge pull request #5870 from jmacxx/mediation_payout_ux
Browse files Browse the repository at this point in the history
Improve user experience once mediation has been accepted by both parties
  • Loading branch information
bisq-github-admin-3 authored Jan 12, 2022
2 parents 553503d + 4a3e29d commit 8401b38
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 217 deletions.
9 changes: 6 additions & 3 deletions core/src/main/java/bisq/core/trade/TradeManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@ private void handleTakeOfferRequest(NodeAddress peer, InputsForDepositTxRequest
try {
Validator.nonEmptyStringOf(inputsForDepositTxRequest.getTradeId());
} catch (Throwable t) {
log.warn("Invalid inputsForDepositTxRequest " + inputsForDepositTxRequest.toString());
log.warn("Invalid inputsForDepositTxRequest " + inputsForDepositTxRequest);
return;
}

Optional<OpenOffer> openOfferOptional = openOfferManager.getOpenOfferById(inputsForDepositTxRequest.getTradeId());
if (!openOfferOptional.isPresent()) {
if (openOfferOptional.isEmpty()) {
return;
}

Expand Down Expand Up @@ -702,7 +702,10 @@ public void onTradeCompleted(Trade trade) {
public void closeDisputedTrade(String tradeId, Trade.DisputeState disputeState) {
getTradeById(tradeId).ifPresent(trade -> {
trade.setDisputeState(disputeState);
onTradeCompleted(trade);
checkNotNull(trade.getContract(), "Trade contract must not be null");
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();
});
Expand Down
15 changes: 5 additions & 10 deletions core/src/main/resources/i18n/displayStrings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -900,20 +900,15 @@ portfolio.pending.step3_seller.onPaymentReceived.signer=IMPORTANT: By confirming
you should delay confirmation of the payment as long as possible to reduce the risk of a chargeback.

portfolio.pending.step5_buyer.groupTitle=Summary of completed trade
portfolio.pending.step5_buyer.groupTitle.mediated=This trade was resolved by mediation
portfolio.pending.step5_buyer.groupTitle.arbitrated=This trade was resolved by arbitration
portfolio.pending.step5_buyer.tradeFee=Trade fee
portfolio.pending.step5_buyer.makersMiningFee=Mining fee
portfolio.pending.step5_buyer.takersMiningFee=Total mining fees
portfolio.pending.step5_buyer.refunded=Refunded security deposit
portfolio.pending.step5_buyer.withdrawBTC=Withdraw your bitcoin
portfolio.pending.step5_buyer.amount=Amount to withdraw
portfolio.pending.step5_buyer.withdrawToAddress=Withdraw to address
portfolio.pending.step5_buyer.moveToBisqWallet=Keep funds in Bisq wallet
portfolio.pending.step5_buyer.withdrawExternal=Withdraw to external wallet
portfolio.pending.step5_buyer.alreadyWithdrawn=Your funds have already been withdrawn.\nPlease check the transaction history.
portfolio.pending.step5_buyer.confirmWithdrawal=Confirm withdrawal request
portfolio.pending.step5_buyer.amountTooLow=The amount to transfer is lower than the transaction fee and the min. possible tx value (dust).
portfolio.pending.step5_buyer.withdrawalCompleted.headline=Withdrawal completed
portfolio.pending.step5_buyer.withdrawalCompleted.msg=Your completed trades are stored under \"Portfolio/History\".\nYou can review all your bitcoin transactions under \"Funds/Transactions\"
portfolio.pending.step5_buyer.tradeCompleted.headline=Trade completed
portfolio.pending.step5_buyer.tradeCompleted.msg=Your completed trades are stored under \"Portfolio/History\".\nYou can review all your bitcoin transactions under \"Funds/Transactions\"
portfolio.pending.step5_buyer.bought=You have bought
portfolio.pending.step5_buyer.paid=You have paid

Expand Down Expand Up @@ -3160,7 +3155,7 @@ notification.walletUpdate.headline=Trading wallet update
notification.walletUpdate.msg=Your trading wallet is sufficiently funded.\nAmount: {0}
notification.takeOffer.walletUpdate.msg=Your trading wallet was already sufficiently funded from an earlier take offer attempt.\nAmount: {0}
notification.tradeCompleted.headline=Trade completed
notification.tradeCompleted.msg=You can withdraw your funds now to your external Bitcoin wallet or transfer it to the Bisq wallet.
notification.tradeCompleted.msg=You can withdraw your funds now to your external Bitcoin wallet from Funds > Send Funds.
notification.bsqSwap.maker.headline=BSQ swap completed
notification.bsqSwap.maker.tradeCompleted=Your offer with ID ''{0}'' has been taken.
notification.bsqSwap.confirmed.headline=BSQ swap transaction confirmed
Expand Down
Loading

0 comments on commit 8401b38

Please sign in to comment.