Browse Source

avoid npe loading new wallets with watchlast set

terminal
Craig Raw 3 years ago
parent
commit
ba199ff11b
  1. 2
      src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.java

2
src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.java

@ -348,7 +348,7 @@ public class ElectrumServer {
private Set<WalletNode> getAddressNodes(Wallet wallet, WalletNode purposeNode) {
Integer watchLast = wallet.getWatchLast();
if(watchLast == null || watchLast < wallet.getGapLimit() || wallet.getStoredBlockHeight() == 0 || wallet.getTransactions().isEmpty()) {
if(watchLast == null || watchLast < wallet.getGapLimit() || wallet.getStoredBlockHeight() == null || wallet.getStoredBlockHeight() == 0 || wallet.getTransactions().isEmpty()) {
return purposeNode.getChildren();
}

Loading…
Cancel
Save