From 32bc9f6a99c46a18838037112feda6f166a4274e Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Fri, 25 Sep 2020 17:56:57 +0200 Subject: [PATCH] dont refresh invalid wallets --- .../java/com/sparrowwallet/sparrow/wallet/WalletForm.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletForm.java b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletForm.java index 43bf6e23..0a4a9b20 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletForm.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletForm.java @@ -225,9 +225,11 @@ public class WalletForm { @Subscribe public void walletNodeHistoryChanged(WalletNodeHistoryChangedEvent event) { - WalletNode walletNode = event.getWalletNode(wallet); - if(walletNode != null) { - refreshHistory(AppController.getCurrentBlockHeight(), walletNode); + if(wallet.isValid()) { + WalletNode walletNode = event.getWalletNode(wallet); + if(walletNode != null) { + refreshHistory(AppController.getCurrentBlockHeight(), walletNode); + } } }