handle lightning balance fetch failures (#3382)

Serhii committed Jul 13, 2026 at 04:24 UTC 7403aec38d243625563f0cb083e9ede3de77b474
1 file changed +4
cw_bitcoin/lib/bitcoin_wallet.dart
+4
@@ -345,12 +345,16 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
345 return balance;
346 }
347
348 + try {
349 final lBalance = await lightningWallet!.getBalance();
350
351 this.balance[CryptoCurrency.btcln] = ElectrumBalance(
352 confirmed: lBalance,
353 unconfirmed: Money.zero(CryptoCurrency.btcln),
354 frozen: Money.zero(CryptoCurrency.btcln));
355 + } catch (e) {
356 + printV("Error fetching lightning balance: $e");
357 + }
358
359 return ElectrumBalance(
360 confirmed: balance.confirmed,