getMisses method

Future<String> getMisses(
  1. String validator
)

Implementation

Future<String> getMisses(String validator) async {
  var rootPath =
      "${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_ORACLE_VALIDATORS}/$validator/${CosmosOracleConstants.MISS}";

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

  throw Exception("");
}