diff --git a/drongo b/drongo index 891499af..1aeaacaf 160000 --- a/drongo +++ b/drongo @@ -1 +1 @@ -Subproject commit 891499aff04b69f53bf143464001b96b44a0ec53 +Subproject commit 1aeaacaf59484c76d5bf485dabb4a632c5230032 diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java index b7aaa9bc..abd67ff1 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java @@ -14,10 +14,7 @@ import com.sparrowwallet.drongo.wallet.UtxoSelector; import com.sparrowwallet.sparrow.AppServices; import com.sparrowwallet.sparrow.CurrencyRate; import com.sparrowwallet.sparrow.EventManager; -import com.sparrowwallet.sparrow.control.CoinTextFormatter; -import com.sparrowwallet.sparrow.control.CopyableTextField; -import com.sparrowwallet.sparrow.control.FiatLabel; -import com.sparrowwallet.sparrow.control.QRScanDialog; +import com.sparrowwallet.sparrow.control.*; import com.sparrowwallet.sparrow.event.BitcoinUnitChangedEvent; import com.sparrowwallet.sparrow.event.ExchangeRatesUpdatedEvent; import com.sparrowwallet.sparrow.event.FiatCurrencySelectedEvent; @@ -59,6 +56,9 @@ public class PaymentController extends WalletFormController implements Initializ @FXML private FiatLabel fiatAmount; + @FXML + private Label amountStatus; + @FXML private ToggleButton maxButton; @@ -141,6 +141,11 @@ public class PaymentController extends WalletFormController implements Initializ sendController.utxoLabelSelectionProperty().addListener((observable, oldValue, newValue) -> { maxButton.setText("Max" + newValue); }); + amountStatus.managedProperty().bind(amountStatus.visibleProperty()); + amountStatus.setVisible(sendController.isInsufficientInputs()); + sendController.insufficientInputsProperty().addListener((observable, oldValue, newValue) -> { + amountStatus.setVisible(newValue); + }); Optional firstTab = sendController.getPaymentTabs().getTabs().stream().findFirst(); if(firstTab.isPresent()) { diff --git a/src/main/resources/com/sparrowwallet/sparrow/wallet/payment.fxml b/src/main/resources/com/sparrowwallet/sparrow/wallet/payment.fxml index 2d19e81d..aed67c77 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/wallet/payment.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/wallet/payment.fxml @@ -56,6 +56,17 @@