diff --git a/src/main/java/com/sparrowwallet/sparrow/preferences/GeneralPreferencesController.java b/src/main/java/com/sparrowwallet/sparrow/preferences/GeneralPreferencesController.java index 739a34c1..5fb0a750 100644 --- a/src/main/java/com/sparrowwallet/sparrow/preferences/GeneralPreferencesController.java +++ b/src/main/java/com/sparrowwallet/sparrow/preferences/GeneralPreferencesController.java @@ -18,6 +18,7 @@ import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.scene.control.ComboBox; +import javafx.scene.control.Label; import javafx.util.StringConverter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -45,6 +46,9 @@ public class GeneralPreferencesController extends PreferencesDetailController { @FXML private ComboBox exchangeSource; + @FXML + private Label currenciesLoadWarning; + @FXML private UnlabeledToggleSwitch loadRecentWallets; @@ -87,6 +91,9 @@ public class GeneralPreferencesController extends PreferencesDetailController { EventManager.get().post(new FeeRatesSourceChangedEvent(newValue)); }); + currenciesLoadWarning.managedProperty().bind(currenciesLoadWarning.visibleProperty()); + currenciesLoadWarning.setVisible(false); + blockExplorers.setItems(getBlockExplorerList()); blockExplorers.setConverter(new StringConverter<>() { @Override @@ -237,6 +244,8 @@ public class GeneralPreferencesController extends PreferencesDetailController { fiatCurrency.setDisable(true); } + currenciesLoadWarning.setVisible(exchangeSource.getValue() != ExchangeSource.NONE && currencies.isEmpty()); + //Always fire event regardless of previous selection to update rates EventManager.get().post(new FiatCurrencySelectedEvent(exchangeSource.getValue(), fiatCurrency.getValue())); diff --git a/src/main/resources/com/sparrowwallet/sparrow/general.css b/src/main/resources/com/sparrowwallet/sparrow/general.css index 66ac50e6..bdcaa245 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/general.css +++ b/src/main/resources/com/sparrowwallet/sparrow/general.css @@ -320,3 +320,7 @@ CellView > .text-input.text-field { -fx-background-color: -fx-control-inner-background; } +.field-warning { + -fx-text-fill: rgb(238, 210, 2); + -fx-padding: 0 0 0 12; +} diff --git a/src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml b/src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml index d837e883..33ba8238 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml @@ -15,6 +15,7 @@ + @@ -60,6 +61,11 @@ +