Skip to content

Commit

Permalink
Fix QueryConnectionsUsingClient for cosmos (#1162)
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin authored Apr 6, 2023
1 parent f9aaf3d commit d619c89
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions relayer/chains/cosmos/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -727,8 +732,6 @@ func (cc *CosmosProvider) queryChannelABCI(ctx context.Context, height int64, po
return nil, err
}



return &chantypes.QueryChannelResponse{
Channel: &channel,
Proof: proofBz,
Expand Down

0 comments on commit d619c89

Please sign in to comment.