mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-25 07:27:18 +01:00
Improve warning when BSQ swap offer is removed
This commit is contained in:
parent
981d6ff000
commit
ec5f217f2f
3 changed files with 12 additions and 1 deletions
|
@ -2973,6 +2973,7 @@ popup.warning.chainNotSynced=The Bisq wallet blockchain height is not synced cor
|
||||||
You can check the blockchain height in Settings/Network Info. If more than one block passes and this problem persists it may be stalled, in which case you should do an SPV resync. [HYPERLINK:https://bisq.wiki/Resyncing_SPV_file]
|
You can check the blockchain height in Settings/Network Info. If more than one block passes and this problem persists it may be stalled, in which case you should do an SPV resync. [HYPERLINK:https://bisq.wiki/Resyncing_SPV_file]
|
||||||
popup.warning.daoNeedsResync=Your Bisq DAO state needs to be resynced.\n\nPlease navigate to DAO Network Monitor menu and follow the prompts to resync the DAO state.
|
popup.warning.daoNeedsResync=Your Bisq DAO state needs to be resynced.\n\nPlease navigate to DAO Network Monitor menu and follow the prompts to resync the DAO state.
|
||||||
popup.warning.removeOffer=Are you sure you want to remove that offer?\nThe maker fee of {0} will be lost if you remove that offer.
|
popup.warning.removeOffer=Are you sure you want to remove that offer?\nThe maker fee of {0} will be lost if you remove that offer.
|
||||||
|
popup.warning.removeNoFeeOffer=Are you sure you want to remove that offer?\nNo maker fee will be lost if you remove that offer.
|
||||||
popup.warning.tooLargePercentageValue=You cannot set a percentage of 100% or larger.
|
popup.warning.tooLargePercentageValue=You cannot set a percentage of 100% or larger.
|
||||||
popup.warning.examplePercentageValue=Please enter a percentage number like \"5.4\" for 5.4%
|
popup.warning.examplePercentageValue=Please enter a percentage number like \"5.4\" for 5.4%
|
||||||
popup.warning.noPriceFeedAvailable=There is no price feed available for that currency. You cannot use a percent based price.\nPlease select the fixed price.
|
popup.warning.noPriceFeedAvailable=There is no price feed available for that currency. You cannot use a percent based price.\nPlease select the fixed price.
|
||||||
|
|
|
@ -396,7 +396,10 @@ public class OpenOffersView extends ActivatableViewAndModel<VBox, OpenOffersView
|
||||||
if (model.isBootstrappedOrShowPopup()) {
|
if (model.isBootstrappedOrShowPopup()) {
|
||||||
String key = "RemoveOfferWarning";
|
String key = "RemoveOfferWarning";
|
||||||
if (DontShowAgainLookup.showAgain(key)) {
|
if (DontShowAgainLookup.showAgain(key)) {
|
||||||
new Popup().warning(Res.get("popup.warning.removeOffer", model.getMakerFeeAsString(openOffer)))
|
String message = model.isMakerFee(openOffer) ?
|
||||||
|
Res.get("popup.warning.removeOffer", model.getMakerFeeAsString(openOffer)) :
|
||||||
|
Res.get("popup.warning.removeNoFeeOffer");
|
||||||
|
new Popup().warning(message)
|
||||||
.actionButtonText(Res.get("shared.removeOffer"))
|
.actionButtonText(Res.get("shared.removeOffer"))
|
||||||
.onAction(() -> doRemoveOpenOffer(openOffer))
|
.onAction(() -> doRemoveOpenOffer(openOffer))
|
||||||
.closeButtonText(Res.get("shared.dontRemoveOffer"))
|
.closeButtonText(Res.get("shared.dontRemoveOffer"))
|
||||||
|
|
|
@ -38,6 +38,8 @@ import bisq.network.p2p.P2PService;
|
||||||
import bisq.common.handlers.ErrorMessageHandler;
|
import bisq.common.handlers.ErrorMessageHandler;
|
||||||
import bisq.common.handlers.ResultHandler;
|
import bisq.common.handlers.ResultHandler;
|
||||||
|
|
||||||
|
import org.bitcoinj.core.Coin;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
|
@ -181,6 +183,11 @@ class OpenOffersViewModel extends ActivatableWithDataModel<OpenOffersDataModel>
|
||||||
return GUIUtil.isBootstrappedOrShowPopup(p2PService);
|
return GUIUtil.isBootstrappedOrShowPopup(p2PService);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMakerFee(OpenOffer openOffer) {
|
||||||
|
Coin makerFee = openOffer.getOffer().getMakerFee();
|
||||||
|
return makerFee != null && makerFee.isPositive();
|
||||||
|
}
|
||||||
|
|
||||||
public String getMakerFeeAsString(OpenOffer openOffer) {
|
public String getMakerFeeAsString(OpenOffer openOffer) {
|
||||||
Offer offer = openOffer.getOffer();
|
Offer offer = openOffer.getOffer();
|
||||||
return offer.isCurrencyForMakerFeeBtc() ?
|
return offer.isCurrencyForMakerFeeBtc() ?
|
||||||
|
|
Loading…
Add table
Reference in a new issue