mirror of
https://github.com/bisq-network/bisq.git
synced 2025-01-18 21:35:03 +01:00
Only show XMR subaddress recommendation if the user has a XMR account setup.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
parent
f03c29e238
commit
2c040ec7f5
@ -41,7 +41,6 @@ import bisq.desktop.main.presentation.AccountPresentation;
|
||||
import bisq.core.locale.Res;
|
||||
import bisq.core.user.DontShowAgainLookup;
|
||||
|
||||
import bisq.common.app.DevEnv;
|
||||
import bisq.common.util.Utilities;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@ -273,14 +272,6 @@ public class AccountView extends ActivatableView<TabPane, Void> {
|
||||
.backgroundInfo(Res.get("account.info.msg"))
|
||||
.dontShowAgainId(key)
|
||||
.show();
|
||||
} else {
|
||||
// news badge leads to the XMR subaddress info page (added in v1.9.2)
|
||||
new Popup()
|
||||
.headLine(Res.get("account.altcoin.popup.xmr.dataDirWarningHeadline"))
|
||||
.backgroundInfo(Res.get("account.altcoin.popup.xmr.dataDirWarning"))
|
||||
.dontShowAgainId("accountSubAddressInfo")
|
||||
.width(700)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,9 +18,11 @@
|
||||
package bisq.desktop.main.account.content.altcoinaccounts;
|
||||
|
||||
import bisq.desktop.common.model.ActivatableDataModel;
|
||||
import bisq.desktop.main.overlays.popups.Popup;
|
||||
import bisq.desktop.util.GUIUtil;
|
||||
|
||||
import bisq.core.locale.CryptoCurrency;
|
||||
import bisq.core.locale.Res;
|
||||
import bisq.core.locale.TradeCurrency;
|
||||
import bisq.core.offer.OpenOfferManager;
|
||||
import bisq.core.payment.AssetAccount;
|
||||
@ -76,6 +78,16 @@ class AltCoinAccountsDataModel extends ActivatableDataModel {
|
||||
protected void activate() {
|
||||
user.getPaymentAccountsAsObservable().addListener(setChangeListener);
|
||||
fillAndSortPaymentAccounts();
|
||||
|
||||
paymentAccounts.stream().filter(e -> e.getSingleTradeCurrency().getCode().equals("XMR"))
|
||||
.findAny().ifPresent(e -> {
|
||||
new Popup()
|
||||
.headLine(Res.get("account.altcoin.popup.xmr.dataDirWarningHeadline"))
|
||||
.backgroundInfo(Res.get("account.altcoin.popup.xmr.dataDirWarning"))
|
||||
.dontShowAgainId("accountSubAddressInfo")
|
||||
.width(700)
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
private void fillAndSortPaymentAccounts() {
|
||||
|
Loading…
Reference in New Issue
Block a user