getVotingParams method

Future<ProposalsVotesParams> getVotingParams()

Implementation

Future<ProposalsVotesParams> getVotingParams() async {
  String root =
      "${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_GOV_PARAMS_VOTING}";

  var response = await apiRequester.getAsync<ProposalsParams>(root);
  if (response.successful!) {
    var results = ProposalsParams.fromJson(response.result!);

    return ProposalsVotesParams.fromJSON(results.voting_params);
  }

  throw Exception("");
}