Browse Source

enable max button when rbf replacement tx has only one output

terminal
Craig Raw 3 years ago
parent
commit
b06df383dd
  1. 2
      src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java
  2. 4
      src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java

2
src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java

@ -240,7 +240,7 @@ public class EntryCell extends TreeTableCell<Entry, Entry> {
}
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;

4
src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java

@ -312,7 +312,9 @@ public class PaymentController extends WalletFormController implements Initializ
}
private void updateOpenWallets(Collection<Wallet> wallets) {
List<Wallet> openWalletList = wallets.stream().filter(wallet -> wallet.isValid() && !wallet.isWhirlpoolChildWallet() && !wallet.isBip47()).collect(Collectors.toList());
List<Wallet> 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);

Loading…
Cancel
Save