getBalance method

Future<Amount> getBalance({
  1. required String address,
})

Implementation

Future<Amount> getBalance({required String address}) async {
  final accountInfo = await getAccount(address: address);

  final balance = accountInfo["balance"] as int;

  return Amount(value: balance.toBigInt, decimals: 6);
}