getRedelegations method
Implementation
Future<List<RedelegationResponseJSON>> getRedelegations(
String delegator, String? validatorSrc, String? validatorDst) async {
String rootPath =
"${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_STAKING_DELEGATORS_BASE}/$delegator/${CosmosStakingConstants.REDELEGATIONS}?src_validator_addr=$validatorSrc&dst_validator_addr=$validatorDst";
// if (options != null)
// {
// rootPath += PaginationOptionExtensions.GetPaginationRules(options);
// }
var response = await apiRequester.getAsync<StakingCommonJson>(rootPath);
if (response.successful!) {
var result = StakingCommonJson.fromJson(response.result!);
return result.redelegation_responses;
}
throw Exception("");
}