Merge pull request #6537 from yonson2023/fix_issue_6529

Differenciate offer removal pop-ups for BSQ swaps and regular trades.
This commit is contained in:
Alejandro García 2023-01-28 19:21:19 +00:00 committed by GitHub
commit 74d0eaf462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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))