getClientStatusByID method

Future<String> getClientStatusByID(
  1. String clientId
)

Implementation

Future<String> getClientStatusByID(String clientId) async {
  String rootPath =
      "${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_IBC_CORE_CLIENT_CLIENTSTATUS}/$clientId";

  var response = await apiRequester.getAsync<IBCApiClientStatus>(rootPath);
  if (response.successful!) {
    var result = IBCApiClientStatus.fromJson(response.result!);
    return result.status;
  }

  throw Exception(
      "Could not successfully fetch the client state information for client Id: $clientId");
}