getUnbondingDelegationsForAllValuesReady static method

Future<UnbondingDelegation> getUnbondingDelegationsForAllValuesReady(
  1. TerraRestfulService apiRequester,
  2. String delegator,
  3. String validator, {
  4. PaginationOptions? options,
})

Implementation

static Future<UnbondingDelegation> getUnbondingDelegationsForAllValuesReady(
    TerraRestfulService apiRequester, String delegator, String validator,
    {PaginationOptions? options}) async {
  String rootPath =
      "${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_STAKING_VALIDATORS_BASE}/$validator/${CosmosStakingConstants.DELEGATIONS}/$delegator/${CosmosStakingConstants.UNBONDING_DELEGATION}";

  // if (options != null)
  // {
  //     rootPath += PaginationOptionExtensions.GetPaginationRules(options);
  // }

  var response =
      await apiRequester.getAsync<UnbondingDelegationJSON>(rootPath);
  if (response.successful!) {
    return UnbondingDelegation.fromJSON(
        UnbondingDelegationJSON.fromJson(response.result!).unbond);
  }

  throw Exception("");
}