fix: catch error in newly added fetchTransactions call (#2265)

fix: null handling in cw_monero
This commit is contained in:
cyan 2025-05-15 01:07:17 +02:00 committed by GitHub
parent ca8dbf3c81
commit 40084ec532
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 6 deletions

View file

@ -139,16 +139,16 @@ String getAddress({int accountIndex = 0, int addressIndex = 0}) {
}
int getFullBalance({int accountIndex = 0}) =>
currentWallet!.balance(accountIndex: accountIndex);
currentWallet?.balance(accountIndex: accountIndex) ?? 0;
int getUnlockedBalance({int accountIndex = 0}) =>
currentWallet!.unlockedBalance(accountIndex: accountIndex);
currentWallet?.unlockedBalance(accountIndex: accountIndex) ?? 0;
int getCurrentHeight() => currentWallet!.blockChainHeight();
int getCurrentHeight() => currentWallet?.blockChainHeight() ?? 0;
int getNodeHeightSync() => currentWallet!.daemonBlockChainHeight();
int getNodeHeightSync() => currentWallet?.daemonBlockChainHeight() ?? 0;
bool isConnectedSync() => currentWallet!.connected() != 0;
bool isConnectedSync() => currentWallet?.connected() != 0;
Future<bool> setupNodeSync(
{required String address,