Skip to content

Conversation

infiniteflower
Copy link
Contributor

@infiniteflower infiniteflower commented Apr 1, 2025

Explanation

This PR allows passing in either a chainId or a networkClientId to fetchTopAssets. Previously only networkClientId was allowed.

This is to support the case of Bridge where a user could select a destination chain that they have not added to MM yet, there by not having a networkClientId to provide. The user will have a destination chainId that we want to look up top assets on.

References

Related to MetaMask/metamask-mobile#14258

Changelog

@metamask/swaps-controller

  • CHANGED: Allow passing in either a chainId or a networkClientId to fetchTopAssets. Previously only networkClientId was allowed.

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

@infiniteflower infiniteflower marked this pull request as ready for review April 1, 2025 03:38
@infiniteflower infiniteflower requested a review from a team April 1, 2025 03:38
@infiniteflower infiniteflower merged commit eb253bd into main Apr 1, 2025
11 checks passed
@infiniteflower infiniteflower deleted the feat/fetchTopAssets-chainId branch April 1, 2025 04: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