Skip to content

Commit

Permalink
fix: prevent crash when showing inactivity notification when there is…
Browse files Browse the repository at this point in the history
… no wallet (#1237)
  • Loading branch information
HashEngineering authored Dec 13, 2023
1 parent 03ec62c commit 2c2839a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ private void maybeShowInactivityNotification() {
return;

final Wallet wallet = walletDataProvider.getWallet();
if (wallet == null) {
// with version 7.0 and above it is possible to have the app installed without a wallet
log.info("wallet does not exist, not showing inactivity warning");
return;
}
final Coin estimatedBalance = wallet.getBalance(Wallet.BalanceType.ESTIMATED_SPENDABLE);
if (!estimatedBalance.isPositive())
return;
Expand Down

0 comments on commit 2c2839a

Please sign in to comment.