mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-28 17:15:14 +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);
|
||||
addAccountNameTextFieldWithAutoFillToggleButton();
|
||||
|
||||
new Popup()
|
||||
.headLine(Res.get("account.altcoin.popup.xmr.dataDirWarningHeadline"))
|
||||
.backgroundInfo(Res.get("account.altcoin.popup.xmr.dataDirWarning"))
|
||||
.dontShowAgainId("accountSubAddressInfo")
|
||||
.width(700)
|
||||
.show();
|
||||
showXmrSubAddressPopup();
|
||||
}
|
||||
|
||||
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() {
|
||||
String key = "xmrSubAddressInfo";
|
||||
if (DontShowAgainLookup.showAgain(key)) {
|
||||
|
|
|
@ -18,11 +18,10 @@
|
|||
package bisq.desktop.main.account.content.altcoinaccounts;
|
||||
|
||||
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.core.locale.CryptoCurrency;
|
||||
import bisq.core.locale.Res;
|
||||
import bisq.core.locale.TradeCurrency;
|
||||
import bisq.core.offer.OpenOfferManager;
|
||||
import bisq.core.payment.AssetAccount;
|
||||
|
@ -85,12 +84,7 @@ class AltCoinAccountsDataModel extends ActivatableDataModel {
|
|||
.filter(e -> e.getSingleTradeCurrency().getCode().equals("XMR"))
|
||||
.forEach(e -> {
|
||||
if (!xmrAccountUsesSubAddresses(e)) {
|
||||
new Popup()
|
||||
.headLine(Res.get("account.altcoin.popup.xmr.dataDirWarningHeadline"))
|
||||
.backgroundInfo(Res.get("account.altcoin.popup.xmr.dataDirWarning"))
|
||||
.dontShowAgainId("accountSubAddressInfo")
|
||||
.width(700)
|
||||
.show();
|
||||
XmrForm.showXmrSubAddressPopup();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue