mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
handle lightning balance fetch failures (#3382)
This commit is contained in:
@@ -345,12 +345,16 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
|
||||
return balance;
|
||||
}
|
||||
|
||||
try {
|
||||
final lBalance = await lightningWallet!.getBalance();
|
||||
|
||||
this.balance[CryptoCurrency.btcln] = ElectrumBalance(
|
||||
confirmed: lBalance,
|
||||
unconfirmed: Money.zero(CryptoCurrency.btcln),
|
||||
frozen: Money.zero(CryptoCurrency.btcln));
|
||||
} catch (e) {
|
||||
printV("Error fetching lightning balance: $e");
|
||||
}
|
||||
|
||||
return ElectrumBalance(
|
||||
confirmed: balance.confirmed,
|
||||
|
||||
Reference in New Issue
Block a user