Show popup warning about the ARS blue market price when saving the fiat payment account creation instead at startup.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
HenrikJannsen 2024-05-26 18:54:33 +07:00
parent f03c29e238
commit a3acd4f7f1
No known key found for this signature in database
GPG Key ID: 02AA2BAE387C8307
2 changed files with 16 additions and 15 deletions

View File

@ -320,7 +320,6 @@ public class MainViewModel implements ViewModel, BisqSetup.BisqSetupListener {
setupDevDummyPaymentAccounts();
}
maybeAddArsBlueMarketNotificationToQueue();
getShowAppScreen().set(true);
}
@ -904,20 +903,6 @@ public class MainViewModel implements ViewModel, BisqSetup.BisqSetupListener {
return settingsPresentation.getShowSettingsUpdatesNotification();
}
private void maybeAddArsBlueMarketNotificationToQueue() {
String key = "arsBlueMarketNotificationPopup";
if (DontShowAgainLookup.showAgain(key)) {
Popup popup = new Popup()
.headLine(Res.get("popup.arsBlueMarket.title"))
.information(Res.get("popup.arsBlueMarket.info"))
.actionButtonText(Res.get("shared.iUnderstand"))
.hideCloseButton()
.dontShowAgainId(key);
popup.setDisplayOrderPriority(1);
popupQueue.add(popup);
}
}
private void maybeShowPopupsFromQueue() {
if (!popupQueue.isEmpty()) {
Overlay<?> overlay = popupQueue.poll();

View File

@ -18,16 +18,19 @@
package bisq.desktop.main.account.content.fiataccounts;
import bisq.desktop.common.model.ActivatableDataModel;
import bisq.desktop.main.overlays.popups.Popup;
import bisq.desktop.util.GUIUtil;
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.FiatCurrency;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
import bisq.core.offer.OpenOfferManager;
import bisq.core.payment.AssetAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.trade.TradeManager;
import bisq.core.user.DontShowAgainLookup;
import bisq.core.user.Preferences;
import bisq.core.user.User;
@ -123,6 +126,19 @@ class FiatAccountsDataModel extends ActivatableDataModel {
accountAgeWitnessService.publishMyAccountAgeWitness(paymentAccount.getPaymentAccountPayload());
accountAgeWitnessService.signAndPublishSameNameAccounts();
if (paymentAccount.getSingleTradeCurrency().getCode().equals("ARS")) {
String key = "arsBlueMarketNotificationPopup";
if (DontShowAgainLookup.showAgain(key)) {
new Popup()
.headLine(Res.get("popup.arsBlueMarket.title"))
.information(Res.get("popup.arsBlueMarket.info"))
.actionButtonText(Res.get("shared.iUnderstand"))
.hideCloseButton()
.dontShowAgainId(key)
.show();
}
}
}
public void onUpdateAccount(PaymentAccount paymentAccount) {