getAnnualProvisions method

Future<double> getAnnualProvisions()

Implementation

Future<double> getAnnualProvisions() async {
  var rootPath =
      "${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_MINT_ANNUAL_PROVISIONS}";

  var response =
      await apiRequester.getAsync<MintApiAnnualProvisionsArgs>(rootPath);
  if (response.successful!) {
    var result = MintApiAnnualProvisionsArgs.fromJson(response.result!);
    return double.parse(result.annual_provisions);
  }

  throw Exception("");
}