getTaxProceeds method

Future<double> getTaxProceeds()

Implementation

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

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

  throw Exception("");
}