Skip to content

Comments

fix: limit param in search is incorrect#8019

Merged
juanmigdr merged 5 commits intomainfrom
fix/limit-in-search-is-incorrect
Feb 23, 2026
Merged

fix: limit param in search is incorrect#8019
juanmigdr merged 5 commits intomainfrom
fix/limit-in-search-is-incorrect

Conversation

@juanmigdr
Copy link
Member

@juanmigdr juanmigdr commented Feb 23, 2026

Explanation

According to the docs, we have been passing the incorrect limits to the API since the beginning, I have updated it to pass first instead of limit and added the Ondo exception that is added on the API side

References

https://consensyssoftware.atlassian.net/browse/ASSETS-2632

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Changes request construction for the Token Search API and alters effective result sizes via new clamping logic, which could affect downstream token search UX and pagination expectations.

Overview
Fixes token search pagination by switching the Token API query parameter from limit to first in getTokenSearchURL.

Adds limit clamping to avoid oversized searches: regular queries cap at 50 results, while queries containing Ondo can request up to 500 (otherwise clamped back to 50). Tests are updated/expanded to assert the new parameter and clamping behavior, and the changelog records the fix.

Written by Cursor Bugbot for commit 33d7542. This will update automatically on new commits. Configure here.

@juanmigdr juanmigdr requested a review from a team as a code owner February 23, 2026 16:41
@juanmigdr
Copy link
Member Author

@cursor update the assets-controllers changelog

@cursor
Copy link

cursor bot commented Feb 23, 2026

I've successfully updated the assets-controllers changelog! Here's what I accomplished:

Added a proper changelog entry in the "Unreleased" section under a new "Fixed" category
Documented the token search API fix that changes the parameter from limit to first for correct pagination
Included details about the new features: limit validation (max 50 results by default) and the special Ondo exception (up to 500 results for Ondo queries)
Validated the changelog format using yarn changelog:validate to ensure it meets the project's standards
Committed and pushed the changes to the fix/limit-in-search-is-incorrect branch

The changelog entry follows the project's "Keep a Changelog" format and provides clear information about the bug fix and its implementation details for future reference.

Open in Web Open in Cursor 

- Add entry for fixing limit parameter usage in token search
- Documented change from 'limit' to 'first' parameter
- Noted addition of limit validation and Ondo exception

Co-authored-by: Juanmi <juanmigdr@users.noreply.github.com>
@cursor cursor bot requested a review from a team as a code owner February 23, 2026 16:44
cursoragent and others added 2 commits February 23, 2026 16:48
Correct PR reference from #8008 to #8019 in assets-controllers changelog

Co-authored-by: Juanmi <juanmigdr@users.noreply.github.com>
- Update all nock mocks from 'limit=' to 'first=' parameter
- Add tests for limit validation (max 50 for regular queries)
- Add tests for Ondo exception (allowing up to 500 for Ondo queries)
- Add tests for ignoring very large limits (>500)
- Add test for default limit behavior (defaults to 10)

Co-authored-by: Juanmi <juanmigdr@users.noreply.github.com>
@juanmigdr juanmigdr enabled auto-merge February 23, 2026 17:49
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

@juanmigdr juanmigdr added this pull request to the merge queue Feb 23, 2026
@juanmigdr juanmigdr removed this pull request from the merge queue due to a manual request Feb 23, 2026
@juanmigdr juanmigdr added this pull request to the merge queue Feb 23, 2026
Merged via the queue into main with commit f22dd27 Feb 23, 2026
310 checks passed
@juanmigdr juanmigdr deleted the fix/limit-in-search-is-incorrect branch February 23, 2026 18:15
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.

3 participants