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

feat: add logo url to token search api service and update searchTokens path #5195

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Bigshmow
Copy link
Contributor

@Bigshmow Bigshmow commented Jan 24, 2025

Explanation

The /tokens-search/name endpoint has changed to /tokens-search to better reflect it's usecase in PR-75 in the portfolio api. The endpoint searches by both name and address of tokens from Moralis. Simply "/name" was misleading.

We also updated the param "name" to "query" to better reflect the nature of the request.

References

Changelog

@metamask/token-search-discover-controller

  • Added: The logoUrl is now exposed in TokenSearchResponseItem via searchTokens
  • Breaking:
    • Update the TokenSearchApiService to use the updated URL for searchTokens
      • The URL is now /tokens-search instead of /tokens-search/name
    • Changed the "name" parameter to "query" in the searchTokens method
    • These updates align with the Portfolio API's /tokens-search endpoint
    • The old endpoint /tokens-search/name will remain in a deprecated state until parity across apps is achieved which for now is the portfolio-api and core repos. The mobile PR-13111 is not yet merged.

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 highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@Bigshmow Bigshmow marked this pull request as ready for review January 24, 2025 21:12
@Bigshmow Bigshmow requested review from a team as code owners January 24, 2025 21:12
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.

1 participant