diff --git a/relayer/chains/cosmos/query.go b/relayer/chains/cosmos/query.go index 077253059..f8025456e 100644 --- a/relayer/chains/cosmos/query.go +++ b/relayer/chains/cosmos/query.go @@ -629,7 +629,12 @@ func (cc *CosmosProvider) QueryConnectionsUsingClient(ctx context.Context, heigh return nil, err } - connections.Connections = append(connections.Connections, res.Connections...) + for _, conn := range res.Connections { + if conn.ClientId == clientid { + connections.Connections = append(connections.Connections, conn) + } + } + next := res.GetPagination().GetNextKey() if len(next) == 0 { break @@ -727,8 +732,6 @@ func (cc *CosmosProvider) queryChannelABCI(ctx context.Context, height int64, po return nil, err } - - return &chantypes.QueryChannelResponse{ Channel: &channel, Proof: proofBz,