diff --git a/desktop/src/main/java/haveno/desktop/main/settings/preferences/PreferencesView.java b/desktop/src/main/java/haveno/desktop/main/settings/preferences/PreferencesView.java index 58102d3e0d..f9792d6f94 100644 --- a/desktop/src/main/java/haveno/desktop/main/settings/preferences/PreferencesView.java +++ b/desktop/src/main/java/haveno/desktop/main/settings/preferences/PreferencesView.java @@ -41,7 +41,6 @@ import haveno.core.user.Preferences; import haveno.core.user.User; import haveno.core.util.FormattingUtils; import haveno.core.util.ParsingUtils; -import haveno.core.util.coin.CoinFormatter; import haveno.core.util.validation.IntegerValidator; import haveno.core.util.validation.RegexValidator; import haveno.core.util.validation.RegexValidatorFactory; @@ -81,7 +80,6 @@ import javafx.scene.layout.VBox; import javafx.util.Callback; import javafx.util.StringConverter; import org.apache.commons.lang3.StringUtils; -import org.bitcoinj.core.Coin; import javax.inject.Inject; import javax.inject.Named; @@ -106,7 +104,6 @@ import static haveno.desktop.util.FormBuilder.addTopLabelListView; @FxmlView public class PreferencesView extends ActivatableViewAndModel { private final User user; - private final CoinFormatter formatter; private TextField btcExplorerTextField; private ComboBox userLanguageComboBox; private ComboBox userCountryComboBox; @@ -148,6 +145,8 @@ public class PreferencesView extends ActivatableViewAndModel filterChangeListener; + private boolean hideXmrAutoConf = true; // TODO: remove xmr auto conf or use as a model for other blockchains + /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, initialisation @@ -159,11 +158,9 @@ public class PreferencesView extends ActivatableViewAndModel() { @@ -526,7 +523,7 @@ public class PreferencesView extends ActivatableViewAndModel { if (!newValue.equals(oldValue)) { @@ -801,7 +798,7 @@ public class PreferencesView extends ActivatableViewAndModel { autoConfirmXmrToggle.setSelected(autoConfirmSettings.isEnabled()); autoConfRequiredConfirmationsTf.setText(String.valueOf(autoConfirmSettings.getRequiredConfirmations())); - autoConfTradeLimitTf.setText(formatter.formatCoin(Coin.valueOf(autoConfirmSettings.getTradeLimit()))); + autoConfTradeLimitTf.setText(HavenoUtils.formatXmr(autoConfirmSettings.getTradeLimit())); autoConfServiceAddressTf.setText(String.join(", ", autoConfirmSettings.getServiceAddresses())); autoConfRequiredConfirmationsTf.focusedProperty().addListener(autoConfRequiredConfirmationsFocusOutListener); autoConfTradeLimitTf.textProperty().addListener(autoConfTradeLimitListener);