Skip to content

Commit da05ebf

Browse files
committed
Add warning & redirect txIds to dispute details & filter
Make sure the published warning & redirect txIds of a refund dispute show up in the details window, in place of the DPT ID for v4 protocol trades. (Unlike the latter, the fields are missing from the details for mediation disputes, as it isn't known which combination of staged txs will be published, if any.) Also make sure the two txIds are filterable on, by adding them to the 'DisputeView.FilterResult' enum and 'getFilterResult(..)' method.
1 parent b7330a2 commit da05ebf

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

core/src/main/resources/i18n/displayStrings.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,10 @@ shared.refundAgentForSupportStaff=Refund agent
227227
shared.delayedPayoutTxId=Delayed payout transaction ID
228228
shared.buyersWarningTxId=BTC buyer's warning transaction ID
229229
shared.sellersWarningTxId=BTC seller's warning transaction ID
230+
shared.publishedWarningTxId=Published warning transaction ID
230231
shared.buyersRedirectTxId=BTC buyer's redirection transaction ID
231232
shared.sellersRedirectTxId=BTC seller's redirection transaction ID
233+
shared.publishedRedirectTxId=Published redirection transaction ID
232234
shared.claimTxId=Claim transaction ID
233235
shared.peersClaimTxId=Peer's claim transaction ID
234236
shared.delayedPayoutTxReceiverAddress=Delayed payout transaction sent to

desktop/src/main/java/bisq/desktop/main/overlays/windows/ContractWindow.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import bisq.core.account.witness.AccountAgeWitnessService;
2727
import bisq.core.locale.CountryUtil;
28-
import bisq.core.locale.CurrencyUtil;
2928
import bisq.core.locale.Res;
3029
import bisq.core.offer.Offer;
3130
import bisq.core.payment.payload.PaymentAccountPayload;
@@ -45,7 +44,6 @@
4544
import bisq.network.p2p.NodeAddress;
4645

4746
import bisq.common.UserThread;
48-
import bisq.common.crypto.PubKeyRing;
4947

5048
import org.bitcoinj.core.Utils;
5149

@@ -143,6 +141,10 @@ private void addContent() {
143141
rows++;
144142
if (dispute.getDelayedPayoutTxId() != null)
145143
rows++;
144+
if (dispute.getWarningTxId() != null)
145+
rows++;
146+
if (dispute.getRedirectTxId() != null)
147+
rows++;
146148
if (dispute.getDonationAddressOfDelayedPayoutTx() != null)
147149
rows++;
148150
if (showAcceptedCountryCodes)
@@ -271,6 +273,12 @@ private void addContent() {
271273
if (dispute.getDelayedPayoutTxId() != null)
272274
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.delayedPayoutTxId"), dispute.getDelayedPayoutTxId());
273275

276+
if (dispute.getWarningTxId() != null)
277+
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.publishedWarningTxId"), dispute.getWarningTxId());
278+
279+
if (dispute.getRedirectTxId() != null)
280+
addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.publishedRedirectTxId"), dispute.getRedirectTxId());
281+
274282
if (dispute.getDonationAddressOfDelayedPayoutTx() != null) {
275283
addLabelExplorerAddressTextField(gridPane, ++rowIndex, Res.get("shared.delayedPayoutTxReceiverAddress"),
276284
dispute.getDonationAddressOfDelayedPayoutTx());

desktop/src/main/java/bisq/desktop/main/support/dispute/DisputeView.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ public enum FilterResult {
140140
DEPOSIT_TX("Deposit tx ID"),
141141
PAYOUT_TX("Payout tx ID"),
142142
DEL_PAYOUT_TX("Delayed payout tx ID"),
143+
WARNING_TX("Warning tx ID"),
144+
REDIRECT_TX("Redirect tx ID"),
143145
RESULT_MESSAGE("Result message"),
144146
REASON("Reason"),
145147
JSON("Contract as json");
@@ -478,6 +480,12 @@ protected FilterResult getFilterResult(Dispute dispute, String filterTerm) {
478480
if (dispute.getDelayedPayoutTxId() != null && dispute.getDelayedPayoutTxId().contains(filter)) {
479481
return FilterResult.DEL_PAYOUT_TX;
480482
}
483+
if (dispute.getWarningTxId() != null && dispute.getWarningTxId().contains(filter)) {
484+
return FilterResult.WARNING_TX;
485+
}
486+
if (dispute.getRedirectTxId() != null && dispute.getRedirectTxId().contains(filter)) {
487+
return FilterResult.REDIRECT_TX;
488+
}
481489

482490
DisputeResult disputeResult = dispute.getDisputeResultProperty().get();
483491
if (disputeResult != null) {

0 commit comments

Comments
 (0)