mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-08-09 16:24:53 +00:00
add insufficient inputs feedback label
This commit is contained in:
@@ -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<Tab> firstTab = sendController.getPaymentTabs().getTabs().stream().findFirst();
|
||||
if(firstTab.isPresent()) {
|
||||
|
||||
Reference in New Issue
Block a user