refreshAccount method

Future<void> refreshAccount(
  1. String walletId,
  2. int accountId
)

Implementation

Future<void> refreshAccount(String walletId, int accountId) async {
  if (_isRefreshing) return;
  _isRefreshing = true;
  try {
    await refreshEthBalance(walletId, accountId);
    await refreshStrkBalance(walletId, accountId);
    final isDeployed = await WalletService.isAccountValid(
      account: state.wallets[walletId]!.accounts[accountId]!,
    );
    updateSelectedAccountIsDeployed(
      walletId: walletId,
      accountId: accountId,
      isDeployed: isDeployed,
    );
  } finally {
    _isRefreshing = false;
  }
}