From 9f5eb41d904ef68ac915a15d147230b2452aee56 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 29 Oct 2020 11:23:50 +0200 Subject: [PATCH] dont add change node if no change present --- .../java/com/sparrowwallet/sparrow/wallet/SendController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java index 10071044..d58dfa85 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java @@ -598,7 +598,9 @@ public class SendController extends WalletFormController implements Initializabl private void addWalletTransactionNodes() { WalletTransaction walletTransaction = walletTransactionProperty.get(); Set nodes = new LinkedHashSet<>(walletTransaction.getSelectedUtxos().values()); - nodes.add(walletTransaction.getChangeNode()); + if(walletTransaction.getChangeNode() != null) { + nodes.add(walletTransaction.getChangeNode()); + } List consolidationNodes = walletTransaction.getConsolidationSendNodes(); nodes.addAll(consolidationNodes);