mirror of
https://github.com/bisq-network/bisq.git
synced 2025-03-01 01:32:17 +01:00
Refactor duplicate XMR subaddress popup code
This commit is contained in:
parent
5e04336c4d
commit
861f655ae7
2 changed files with 12 additions and 14 deletions
|
@ -204,12 +204,7 @@ public class XmrForm extends AssetsForm {
|
||||||
addLimitations(false);
|
addLimitations(false);
|
||||||
addAccountNameTextFieldWithAutoFillToggleButton();
|
addAccountNameTextFieldWithAutoFillToggleButton();
|
||||||
|
|
||||||
new Popup()
|
showXmrSubAddressPopup();
|
||||||
.headLine(Res.get("account.altcoin.popup.xmr.dataDirWarningHeadline"))
|
|
||||||
.backgroundInfo(Res.get("account.altcoin.popup.xmr.dataDirWarning"))
|
|
||||||
.dontShowAgainId("accountSubAddressInfo")
|
|
||||||
.width(700)
|
|
||||||
.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFieldManagement(boolean useSubAddresses) {
|
void setFieldManagement(boolean useSubAddresses) {
|
||||||
|
@ -369,6 +364,15 @@ public class XmrForm extends AssetsForm {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void showXmrSubAddressPopup() {
|
||||||
|
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 maybeShowXmrSubAddressInfo() {
|
private void maybeShowXmrSubAddressInfo() {
|
||||||
String key = "xmrSubAddressInfo";
|
String key = "xmrSubAddressInfo";
|
||||||
if (DontShowAgainLookup.showAgain(key)) {
|
if (DontShowAgainLookup.showAgain(key)) {
|
||||||
|
|
|
@ -18,11 +18,10 @@
|
||||||
package bisq.desktop.main.account.content.altcoinaccounts;
|
package bisq.desktop.main.account.content.altcoinaccounts;
|
||||||
|
|
||||||
import bisq.desktop.common.model.ActivatableDataModel;
|
import bisq.desktop.common.model.ActivatableDataModel;
|
||||||
import bisq.desktop.main.overlays.popups.Popup;
|
import bisq.desktop.components.paymentmethods.XmrForm;
|
||||||
import bisq.desktop.util.GUIUtil;
|
import bisq.desktop.util.GUIUtil;
|
||||||
|
|
||||||
import bisq.core.locale.CryptoCurrency;
|
import bisq.core.locale.CryptoCurrency;
|
||||||
import bisq.core.locale.Res;
|
|
||||||
import bisq.core.locale.TradeCurrency;
|
import bisq.core.locale.TradeCurrency;
|
||||||
import bisq.core.offer.OpenOfferManager;
|
import bisq.core.offer.OpenOfferManager;
|
||||||
import bisq.core.payment.AssetAccount;
|
import bisq.core.payment.AssetAccount;
|
||||||
|
@ -85,12 +84,7 @@ class AltCoinAccountsDataModel extends ActivatableDataModel {
|
||||||
.filter(e -> e.getSingleTradeCurrency().getCode().equals("XMR"))
|
.filter(e -> e.getSingleTradeCurrency().getCode().equals("XMR"))
|
||||||
.forEach(e -> {
|
.forEach(e -> {
|
||||||
if (!xmrAccountUsesSubAddresses(e)) {
|
if (!xmrAccountUsesSubAddresses(e)) {
|
||||||
new Popup()
|
XmrForm.showXmrSubAddressPopup();
|
||||||
.headLine(Res.get("account.altcoin.popup.xmr.dataDirWarningHeadline"))
|
|
||||||
.backgroundInfo(Res.get("account.altcoin.popup.xmr.dataDirWarning"))
|
|
||||||
.dontShowAgainId("accountSubAddressInfo")
|
|
||||||
.width(700)
|
|
||||||
.show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue