mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
final fix for send to paynym max button issue
This commit is contained in:
parent
689f4abfde
commit
9dcf3b7eea
2 changed files with 2 additions and 6 deletions
|
@ -328,7 +328,7 @@ public class PaymentController extends WalletFormController implements Initializ
|
||||||
WalletNode sendNode = recipientBip47Wallet.getFreshNode(KeyPurpose.SEND);
|
WalletNode sendNode = recipientBip47Wallet.getFreshNode(KeyPurpose.SEND);
|
||||||
ECKey pubKey = sendNode.getPubKey();
|
ECKey pubKey = sendNode.getPubKey();
|
||||||
Address address = recipientBip47Wallet.getScriptType().getAddress(pubKey);
|
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;
|
return address;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -392,15 +392,11 @@ public class SendController extends WalletFormController implements Initializabl
|
||||||
|
|
||||||
setFeeRate(feeRate);
|
setFeeRate(feeRate);
|
||||||
setEffectiveFeeRate(walletTransaction);
|
setEffectiveFeeRate(walletTransaction);
|
||||||
|
|
||||||
if(walletTransaction.getPayments().stream().anyMatch(Payment::isSendMax)) {
|
|
||||||
updateOptimizationButtons(getPayments());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
transactionDiagram.update(walletTransaction);
|
transactionDiagram.update(walletTransaction);
|
||||||
updatePrivacyAnalysis(walletTransaction);
|
updatePrivacyAnalysis(walletTransaction);
|
||||||
createButton.setDisable(walletTransaction == null || isInsufficientFeeRate() || isPayNymMixOnlyPayment(getPayments()));
|
createButton.setDisable(walletTransaction == null || isInsufficientFeeRate() || isPayNymMixOnlyPayment(walletTransaction.getPayments()));
|
||||||
});
|
});
|
||||||
|
|
||||||
transactionDiagram.sceneProperty().addListener((observable, oldScene, newScene) -> {
|
transactionDiagram.sceneProperty().addListener((observable, oldScene, newScene) -> {
|
||||||
|
|
Loading…
Reference in a new issue