Skip to content

Commit

Permalink
Add missing chain-id check
Browse files Browse the repository at this point in the history
  • Loading branch information
tuantran1702 committed Mar 7, 2024
1 parent e3e2314 commit 69f5bf8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/interchainstaking/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ func (k *Keeper) ZoneWithdrawalRecords(c context.Context, req *types.QueryWithdr
}

ctx := sdk.UnwrapSDKContext(c)
_, found := k.GetZone(ctx, req.ChainId)
if !found {
return nil, status.Error(codes.NotFound, fmt.Sprintf("no zone found matching %s", req.GetChainId()))
}

withdrawalrecords := k.AllZoneWithdrawalRecords(ctx, req.ChainId)

Expand Down

0 comments on commit 69f5bf8

Please sign in to comment.