cancel tx on dispute summary window re-enables buttons
Some checks failed
CI / build (macos-13) (push) Has been cancelled
CI / build (ubuntu-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
Codacy Coverage Reporter / Publish coverage (push) Has been cancelled
CodeQL / Analyze (java) (push) Has been cancelled

This commit is contained in:
woodser 2024-08-02 12:42:07 -04:00
parent 00ceeeba5f
commit d9630a13b5

View file

@ -594,7 +594,11 @@ public class DisputeSummaryWindow extends Overlay<DisputeSummaryWindow> {
// 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<DisputeSummaryWindow> {
});
}
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<DisputeSummaryWindow> {
.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<DisputeSummaryWindow> {
.actionButtonText(Res.get("shared.yes"))
.onAction(resultHandler::handleResult)
.closeButtonText(Res.get("shared.cancel"))
.onClose(() -> cancelHandler.handleResult())
.show();
}
}