getDelegationsForAllValuesReady static method
Future<List<StakingDelegationResponse>>
getDelegationsForAllValuesReady(
- TerraRestfulService apiRequester,
- String delegator,
- String validator, {
- PaginationOptions? options,
})
Implementation
static Future<List<StakingDelegationResponse>>
getDelegationsForAllValuesReady(
TerraRestfulService apiRequester, String delegator, String validator,
{PaginationOptions? options}) async {
String rootPath =
"${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_STAKING_VALIDATORS_BASE}/$validator/${CosmosStakingConstants.DELEGATIONS}/$delegator";
// if (options != null)
// {
// rootPath += PaginationOptionExtensions.GetPaginationRules(options);
// }
var response = await apiRequester.getAsync<StakingCommonJson>(rootPath);
if (response.successful!) {
return StakingCommonJson.fromJson(response.result!).delegation_responses;
}
throw Exception("");
}