Differenciate offer removal pop-ups for BSQ swaps and regular trades.

This commit is contained in:
yonson2023 2023-01-25 10:38:19 -06:00
parent 74e1078318
commit 5d55248b7e
No known key found for this signature in database
GPG Key ID: 653F31AF4087E2F2
2 changed files with 8 additions and 8 deletions

View File

@ -723,11 +723,11 @@ abstract public class OfferBookView<R extends GridPane, M extends OfferBookViewM
private void onRemoveOpenOffer(Offer offer) {
if (model.isBootstrappedOrShowPopup()) {
String key = "RemoveOfferWarning";
String key = (offer.isBsqSwapOffer() ? "RemoveBsqSwapWarning" : "RemoveOfferWarning");
if (DontShowAgainLookup.showAgain(key)) {
String message = offer.getMakerFee().isPositive() ?
Res.get("popup.warning.removeOffer", model.getMakerFeeAsString(offer)) :
Res.get("popup.warning.removeNoFeeOffer");
String message = offer.isBsqSwapOffer() ?
Res.get("popup.warning.removeNoFeeOffer") :
Res.get("popup.warning.removeOffer", model.getMakerFeeAsString(offer));
new Popup().warning(message)
.actionButtonText(Res.get("shared.removeOffer"))
.onAction(() -> doRemoveOffer(offer))

View File

@ -359,11 +359,11 @@ public class OpenOffersView extends ActivatableViewAndModel<VBox, OpenOffersView
private void onRemoveOpenOffer(OpenOfferListItem item) {
OpenOffer openOffer = item.getOpenOffer();
if (model.isBootstrappedOrShowPopup()) {
String key = "RemoveOfferWarning";
String key = (openOffer.getOffer().isBsqSwapOffer() ? "RemoveBsqSwapWarning" : "RemoveOfferWarning");
if (DontShowAgainLookup.showAgain(key)) {
String message = item.hasMakerFee() ?
Res.get("popup.warning.removeOffer", item.getMakerFeeAsString()) :
Res.get("popup.warning.removeNoFeeOffer");
String message = openOffer.getOffer().isBsqSwapOffer() ?
Res.get("popup.warning.removeNoFeeOffer") :
Res.get("popup.warning.removeOffer", item.getMakerFeeAsString());
new Popup().warning(message)
.actionButtonText(Res.get("shared.removeOffer"))
.onAction(() -> doRemoveOpenOffer(openOffer))