Skip to content

Commit

Permalink
token id length check
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-cha committed Jan 15, 2025
1 parent 13e2be7 commit 644b933
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/evm/keeper/query_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ func (qs *queryServerImpl) ERC721ClassIdByContractAddr(ctx context.Context, req

// ERC721OriginTokenInfos implements types.QueryServer.
func (qs *queryServerImpl) ERC721OriginTokenInfos(ctx context.Context, req *types.QueryERC721OriginTokenInfosRequest) (*types.QueryERC721OriginTokenInfosResponse, error) {
if len(req.TokenIds) == 0 {
return nil, errorsmod.Wrap(types.ErrInvalidRequest, "empty token ids")
}

Check warning on line 217 in x/evm/keeper/query_server.go

View check run for this annotation

Codecov / codecov/patch

x/evm/keeper/query_server.go#L216-L217

Added lines #L216 - L217 were not covered by tests
tokenOriginIds, tokenUris, err := qs.Keeper.GetOriginTokenInfos(ctx, req.ClassId, req.TokenIds)
if err != nil {
return nil, err
Expand Down

0 comments on commit 644b933

Please sign in to comment.