Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty request check #391

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions x/liquidity/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var _ types.QueryServer = Querier{}
// LiquidityPool queries a liquidity pool with the given pool id.
func (k Querier) LiquidityPool(c context.Context, req *types.QueryLiquidityPoolRequest) (*types.QueryLiquidityPoolResponse, error) {
empty := &types.QueryLiquidityPoolRequest{}
if req == nil || req == empty {
if req == nil || *req == *empty {
return nil, status.Errorf(codes.InvalidArgument, "empty request")
}

Expand Down Expand Up @@ -61,7 +61,7 @@ func (k Querier) LiquidityPoolBatch(c context.Context, req *types.QueryLiquidity
// Pools queries all liquidity pools currently existed with each liquidity pool with batch and metadata.
func (k Querier) LiquidityPools(c context.Context, req *types.QueryLiquidityPoolsRequest) (*types.QueryLiquidityPoolsResponse, error) {
empty := &types.QueryLiquidityPoolsRequest{}
if req == nil || req == empty {
if req == nil || *req == *empty {
return nil, status.Errorf(codes.InvalidArgument, "empty request")
}

Expand Down