dont add change node if no change present

This commit is contained in:
Craig Raw 2020-10-29 11:23:50 +02:00
parent 3a4d385560
commit 9f5eb41d90

View file

@ -598,7 +598,9 @@ public class SendController extends WalletFormController implements Initializabl
private void addWalletTransactionNodes() { private void addWalletTransactionNodes() {
WalletTransaction walletTransaction = walletTransactionProperty.get(); WalletTransaction walletTransaction = walletTransactionProperty.get();
Set<WalletNode> nodes = new LinkedHashSet<>(walletTransaction.getSelectedUtxos().values()); Set<WalletNode> nodes = new LinkedHashSet<>(walletTransaction.getSelectedUtxos().values());
nodes.add(walletTransaction.getChangeNode()); if(walletTransaction.getChangeNode() != null) {
nodes.add(walletTransaction.getChangeNode());
}
List<WalletNode> consolidationNodes = walletTransaction.getConsolidationSendNodes(); List<WalletNode> consolidationNodes = walletTransaction.getConsolidationSendNodes();
nodes.addAll(consolidationNodes); nodes.addAll(consolidationNodes);