final fix for send to paynym max button issue

This commit is contained in:
Craig Raw 2022-03-11 12:54:09 +02:00
parent 689f4abfde
commit 9dcf3b7eea
2 changed files with 2 additions and 6 deletions

View file

@ -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;
}
}

View file

@ -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) -> {