From 689fe0350006d734a71f12bc5cc103dc92428f0a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 04:57:18 +0000 Subject: [PATCH] `[BP: v7 <- #1262]` fix(query): StakingQueryDelegationsTo reusing the same object (#1264) Co-authored-by: Luca Palla <100412354+LucaPalla95@users.noreply.github.com> --- 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