Skip to content

fix(orders): fall back to tokenId when tokenIds is empty#1959

Closed
umeeSthein wants to merge 1 commit intoProjectOpenSea:mainfrom
umeeSthein:fix/orders-tokenid-fallback
Closed

fix(orders): fall back to tokenId when tokenIds is empty#1959
umeeSthein wants to merge 1 commit intoProjectOpenSea:mainfrom
umeeSthein:fix/orders-tokenid-fallback

Conversation

@umeeSthein
Copy link
Copy Markdown

Summary

  • fall back to tokenId when tokenIds is an empty array in serializeOrdersQueryOptions
  • add a regression test for the tokenIds: [] + tokenId case

Why

When both tokenIds: [] and tokenId are provided, the serializer currently prefers the empty tokenIds array and drops the token filter entirely from the request.

That creates a mismatch with the surrounding validation logic and can send an unfiltered orders request even though a specific tokenId was provided.

Testing

  • added a unit test for the empty tokenIds fallback case

@umeeSthein umeeSthein force-pushed the fix/orders-tokenid-fallback branch from 59967b4 to 55c41c3 Compare March 24, 2026 10:31
@ryanio
Copy link
Copy Markdown
Collaborator

ryanio commented Apr 7, 2026

Thanks for this contribution! We've recreated this fix in our internal monorepo and it will be included in the next release sync. Closing this PR as the change will ship from the internal repo — appreciate you flagging it!

@ryanio ryanio closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants