getUnbondingDelegationsForDelegatorsOnly static method
Future<List<UnbondingDelegation> >
getUnbondingDelegationsForDelegatorsOnly(
- TerraRestfulService apiRequester,
- String delegator, {
- PaginationOptions? options,
Implementation
static Future<List<UnbondingDelegation>>
getUnbondingDelegationsForDelegatorsOnly(
TerraRestfulService apiRequester, String delegator,
{PaginationOptions? options}) async {
String rootPath =
"${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_STAKING_DELEGATORS_BASE}/$delegator/${CosmosStakingConstants.UNBONDING_DELEGATIONS}";
// if (options != null)
// {
// rootPath += PaginationOptionExtensions.GetPaginationRules(options);
// }
var response =
await apiRequester.getAsync<UnbondingDelegationJSON>(rootPath);
if (response.successful!) {
var result = UnbondingDelegationJSON.fromJson(response.result!);
return result.unbonding_responses
.map((w) => UnbondingDelegation.fromJSON(w))
.toList();
}
throw Exception("");
}