From 803df19973a5e8b6206443a991937e7321bc091e Mon Sep 17 00:00:00 2001 From: Luca Palla <100412354+LucaPalla95@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:17:09 +0200 Subject: [PATCH] Fix StakingQueryDelegationsTo function (#1262) (cherry picked from commit ed1e4366839bb3b8a36e2be74fd00161b058f016) --- chain/cosmos/module_staking.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chain/cosmos/module_staking.go b/chain/cosmos/module_staking.go index 0d7ba251e..99d0cf4c8 100644 --- a/chain/cosmos/module_staking.go +++ b/chain/cosmos/module_staking.go @@ -20,8 +20,8 @@ func (c *CosmosChain) StakingQueryDelegationsTo(ctx context.Context, validator s ValidatorDelegations(ctx, &stakingtypes.QueryValidatorDelegationsRequest{ValidatorAddr: validator}) var delegations []*stakingtypes.DelegationResponse - for _, d := range res.DelegationResponses { - delegations = append(delegations, &d) + for i := range res.DelegationResponses { + delegations = append(delegations, &res.DelegationResponses[i]) } return delegations, err