getProposal method

Future<Proposal> getProposal(
  1. double proposalID
)

Implementation

Future<Proposal> getProposal(double proposalID) async {
  String root =
      "${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_GOV_PROPOSALS}/$proposalID";

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

    return Proposal.fromJSON(results.proposal);
  }

  throw Exception("");
}