From b6f047d382ae6589282208d4faa1007e4ac6bb3a Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 2 Sep 2021 15:26:16 +0200 Subject: [PATCH] minor fixes --- .../com/sparrowwallet/sparrow/wallet/UtxosController.java | 2 +- .../sparrow/whirlpool/dataSource/SparrowIndexHandler.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java index ebdb621a..cf7e42d4 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java @@ -123,7 +123,7 @@ public class UtxosController extends WalletFormController implements Initializab AppServices.onlineProperty().addListener(new WeakChangeListener<>(mixingOnlineListener)); utxosTable.getSelectionModel().getSelectedIndices().addListener((ListChangeListener) c -> { - List selectedEntries = utxosTable.getSelectionModel().getSelectedCells().stream().map(tp -> tp.getTreeItem().getValue()).collect(Collectors.toList()); + List selectedEntries = utxosTable.getSelectionModel().getSelectedCells().stream().filter(tp -> tp.getTreeItem() != null).map(tp -> tp.getTreeItem().getValue()).collect(Collectors.toList()); utxosChart.select(selectedEntries); updateButtons(Config.get().getBitcoinUnit()); }); diff --git a/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowIndexHandler.java b/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowIndexHandler.java index 84f3bf88..d68f8140 100644 --- a/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowIndexHandler.java +++ b/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowIndexHandler.java @@ -63,8 +63,8 @@ public class SparrowIndexHandler extends AbstractIndexHandler { } else if(walletNode.getKeyPurpose() == KeyPurpose.CHANGE) { wallet.getMixConfig().setChangeIndex(index); } - } - EventManager.get().post(new WalletMixConfigChangedEvent(wallet)); + EventManager.get().post(new WalletMixConfigChangedEvent(wallet)); + } } }