Browse Source

final fix for send to paynym max button issue

terminal
Craig Raw 3 years ago
parent
commit
9dcf3b7eea
  1. 2
      src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java
  2. 6
      src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java

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

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

Loading…
Cancel
Save