From b06df383ddb5034beddaac7ce73758d902cf19a0 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 11 May 2022 15:18:14 +0200 Subject: [PATCH] enable max button when rbf replacement tx has only one output --- .../java/com/sparrowwallet/sparrow/control/EntryCell.java | 2 +- .../com/sparrowwallet/sparrow/wallet/PaymentController.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java b/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java index 7c8f6505..8d41ecf4 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java @@ -240,7 +240,7 @@ public class EntryCell extends TreeTableCell { } if(txOutput.getScript().getToAddress() != null) { - return new Payment(txOutput.getScript().getToAddress(), label, txOutput.getValue(), false); + return new Payment(txOutput.getScript().getToAddress(), label, txOutput.getValue(), blockTransaction.getTransaction().getOutputs().size() == 1); } return null; diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java index eb7b7a9e..6c1cf58b 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java @@ -312,7 +312,9 @@ public class PaymentController extends WalletFormController implements Initializ } private void updateOpenWallets(Collection wallets) { - List openWalletList = wallets.stream().filter(wallet -> wallet.isValid() && !wallet.isWhirlpoolChildWallet() && !wallet.isBip47()).collect(Collectors.toList()); + List openWalletList = wallets.stream().filter(wallet -> wallet.isValid() + && (wallet == sendController.getWalletForm().getWallet() || !wallet.isWhirlpoolChildWallet()) + && !wallet.isBip47()).collect(Collectors.toList()); if(sendController.getWalletForm().getWallet().hasPaymentCode()) { openWalletList.add(payNymWallet);