From d9630a13b50818eb05a29aa4c6d4bf5f899ad667 Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 2 Aug 2024 12:42:07 -0400 Subject: [PATCH] cancel tx on dispute summary window re-enables buttons --- .../main/overlays/windows/DisputeSummaryWindow.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/DisputeSummaryWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/DisputeSummaryWindow.java index 5bdc0c91..5f7fef32 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/DisputeSummaryWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/DisputeSummaryWindow.java @@ -594,7 +594,11 @@ public class DisputeSummaryWindow extends Overlay { // show confirmation showPayoutTxConfirmation(contract, payoutTx, - () -> doClose(closeTicketButton, cancelButton)); + () -> doClose(closeTicketButton, cancelButton), + () -> { + closeTicketButton.setDisable(false); + cancelButton.setDisable(false); + }); } else { doClose(closeTicketButton, cancelButton); } @@ -607,7 +611,7 @@ public class DisputeSummaryWindow extends Overlay { }); } - private void showPayoutTxConfirmation(Contract contract, MoneroTxWallet payoutTx, ResultHandler resultHandler) { + private void showPayoutTxConfirmation(Contract contract, MoneroTxWallet payoutTx, ResultHandler resultHandler, ResultHandler cancelHandler) { // get buyer and seller destinations (order not preserved) String buyerPayoutAddressString = contract.getBuyerPayoutAddressString(); @@ -641,6 +645,7 @@ public class DisputeSummaryWindow extends Overlay { .actionButtonText(Res.get("shared.yes")) .onAction(() -> resultHandler.handleResult()) .closeButtonText(Res.get("shared.cancel")) + .onClose(() -> cancelHandler.handleResult()) .show(); } else { // No payout will be made @@ -649,6 +654,7 @@ public class DisputeSummaryWindow extends Overlay { .actionButtonText(Res.get("shared.yes")) .onAction(resultHandler::handleResult) .closeButtonText(Res.get("shared.cancel")) + .onClose(() -> cancelHandler.handleResult()) .show(); } }