getAccountInfoWalletAddress method

Future<AccountDto> getAccountInfoWalletAddress(
  1. String walletAddress
)

Implementation

Future<AccountDto> getAccountInfoWalletAddress(String walletAddress) async {
  String root =
      "${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_AUTH_ACCOUNTS}/$walletAddress";

  var response = await apiRequester.getAsync<AccountDtoContainer>(root);
  if (response.successful!) {
    return AccountDtoContainer.fromJson(response.result!).account!;
  }

  throw Exception(
      "Could not successfully fetch the account information for wallet address: $walletAddress");
}