diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java index 66f7022d..d365857b 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java @@ -328,7 +328,7 @@ public class PaymentController extends WalletFormController implements Initializ WalletNode sendNode = recipientBip47Wallet.getFreshNode(KeyPurpose.SEND); ECKey pubKey = sendNode.getPubKey(); Address address = recipientBip47Wallet.getScriptType().getAddress(pubKey); - if(sendController.getPaymentTabs().getTabs().size() > 1 || (getRecipientValueSats() != null && getRecipientValueSats() > getRecipientDustThreshold(address))) { + if(sendController.getPaymentTabs().getTabs().size() > 1 || (getRecipientValueSats() != null && getRecipientValueSats() > getRecipientDustThreshold(address)) || maxButton.isSelected()) { return address; } } diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java index 932527eb..d42ea0ed 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java @@ -392,15 +392,11 @@ public class SendController extends WalletFormController implements Initializabl setFeeRate(feeRate); setEffectiveFeeRate(walletTransaction); - - if(walletTransaction.getPayments().stream().anyMatch(Payment::isSendMax)) { - updateOptimizationButtons(getPayments()); - } } transactionDiagram.update(walletTransaction); updatePrivacyAnalysis(walletTransaction); - createButton.setDisable(walletTransaction == null || isInsufficientFeeRate() || isPayNymMixOnlyPayment(getPayments())); + createButton.setDisable(walletTransaction == null || isInsufficientFeeRate() || isPayNymMixOnlyPayment(walletTransaction.getPayments())); }); transactionDiagram.sceneProperty().addListener((observable, oldScene, newScene) -> {