mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-05 05:46:44 +00:00
avoid npe on new wallet
This commit is contained in:
parent
3093e4906c
commit
b5eb59344c
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ public class Bwt {
|
|||
boolean forceRescan = false;
|
||||
for(Wallet wallet :wallets) {
|
||||
Date txBirthDate = wallet.getTransactions().values().stream().map(BlockTransactionHash::getDate).filter(Objects::nonNull).min(Date::compareTo).orElse(null);
|
||||
if((wallet.getBirthDate() != null && txBirthDate != null && wallet.getBirthDate().before(txBirthDate)) || (txBirthDate == null && wallet.getStoredBlockHeight() == 0)) {
|
||||
if((wallet.getBirthDate() != null && txBirthDate != null && wallet.getBirthDate().before(txBirthDate)) || (txBirthDate == null && wallet.getStoredBlockHeight() != null && wallet.getStoredBlockHeight() == 0)) {
|
||||
forceRescan = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue