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: MMPD-1522 add fetch trending token data #5214

Merged
merged 15 commits into from
Feb 3, 2025

Conversation

Bigshmow
Copy link
Contributor

@Bigshmow Bigshmow commented Jan 30, 2025

Explanation

We are adding a new TokenDiscoveryApiService to handle discovery related requests.
In this PR we are introducing the first method getTrendingTokens which requests trending tokens by chain from the Portfolio API, recently introduced in this PR.

References

For reference this is the jira ticket: MMPD-1522
Related to PR-76 in Portfolio-API

Changelog

@metamask/token-search-discovery-controller

  • Added:
  • Introduce TokenDiscoveryApiService to keep discovery and search responsibilities separate
    • This service is responsible for fetching discover related data
    • Add getTrendingTokens method to fetch trending tokens by chain
    • Add TokenTrendingResponseItem type for trending token responses
  • Export TokenSearchResponseItem type from the package index

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 30, 2025 16:51
@Bigshmow Bigshmow requested review from a team as code owners January 30, 2025 16:51
@Bigshmow Bigshmow requested a review from GuiBibeau January 31, 2025 18:14
Copy link

@GuiBibeau GuiBibeau left a comment

Choose a reason for hiding this comment

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

Reviewed in pair programming session 👍 all looks good!

As noted, test coverage produce some uneeded tests but this seems to be the common pattern in this repo and we won't reinvent the wheel

@Bigshmow Bigshmow enabled auto-merge (squash) February 3, 2025 19:28
@Bigshmow Bigshmow merged commit 1d512aa into main Feb 3, 2025
127 checks passed
@Bigshmow Bigshmow deleted the MMPD-1522-add-fetch-trending-token-data branch February 3, 2025 19:32
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