Skip to content

Conversation

@juanmigdr
Copy link
Member

@juanmigdr juanmigdr commented Jan 23, 2026

Explanation

This PR removes unused swaps-related functionality from the TokenSearchDiscoveryDataController to simplify the token search and discovery system.

This PR causes BREAKING changes on Mobile but not Extension. I have created this PR to fix the breaking changes on Mobile:

References

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

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

Simplifies token search/discovery by removing unused swaps token fetching and state.

  • Deletes swapsTokenAddressesByChainId state and all metadata references; default state now only includes tokenDisplayData
  • Removes constructor params (swapsSupportedChainIds, fetchTokens, fetchSwapsTokensThresholdMs) and the fetchSwapsTokens method; fetchTokenDisplayData no longer calls it
  • Updates tests to drop swaps-related setup/assertions, timers, and snapshots; keeps coverage for token display data behavior
  • Adjusts ESLint suppressions to reflect removed code

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

@juanmigdr juanmigdr requested a review from a team as a code owner January 23, 2026 15:01
@juanmigdr
Copy link
Member Author

@cursor update the changelog.md under assets-controllers with a breaking change

@cursor
Copy link

cursor bot commented Jan 23, 2026

I've successfully updated the assets-controllers CHANGELOG.md file with the breaking change information for the swaps token fetching removal.

What I did:

  • Located and opened the CHANGELOG.md file in /workspace/packages/assets-controllers/
  • Added a new "### Removed" section under "## [Unreleased]" with proper breaking change documentation
  • Documented the removal of swapsTokenAddressesByChainId state, constructor parameters (swapsSupportedChainIds, fetchTokens, fetchSwapsTokensThresholdMs), and the fetchSwapsTokens method
  • Committed the changes with a descriptive message and pushed to the chore/stop-using-swaps-fetchToken branch

The changelog entry follows the project's established format and clearly marks this as a BREAKING change with reference to PR #7712. This should satisfy the CI check that was failing due to missing changelog updates.

Open in Cursor Open in Web

@juanmigdr juanmigdr enabled auto-merge January 23, 2026 15:21
…r swaps token fetching removal

Co-authored-by: juan.gutierrez <juan.gutierrez@consensys.net>
@cursor cursor bot requested a review from a team as a code owner January 23, 2026 15:22
@juanmigdr
Copy link
Member Author

@cursor update the description of this PR, specifically the Explanation section

salimtb
salimtb previously approved these changes Jan 26, 2026
@salimtb
Copy link
Contributor

salimtb commented Jan 26, 2026

you have a conflict , happy to re approve once resolved

@juanmigdr
Copy link
Member Author

@cursor resolve the merge conflicts

@cursor
Copy link

cursor bot commented Jan 26, 2026

Perfect! I've successfully resolved the merge conflicts. Here's what I did:

Merge Conflict Resolution Summary:

  • Identified the conflict: The conflict was in packages/assets-controllers/CHANGELOG.md between our branch's breaking change entry and the main branch's new changes
  • Resolved the conflict: Merged both sections properly by including:
    • The ### Changed section from main branch with the keyring-controller bump
    • The ### Removed section with our breaking change documentation for swaps token fetching removal
  • Committed and pushed: Successfully committed the resolution and pushed to the remote branch

The resolved CHANGELOG.md now includes:

  • ### Changed section with keyring-controller version bump from main branch
  • ### Removed section with our breaking change documentation for the swaps functionality removal

The branch is now up to date with main and the conflicts are resolved. The PR should be ready for review again!

Open in Cursor Open in Web

Co-authored-by: juan.gutierrez <juan.gutierrez@consensys.net>
@juanmigdr juanmigdr added this pull request to the merge queue Jan 26, 2026
Merged via the queue into main with commit 21dc0e4 Jan 26, 2026
301 checks passed
@juanmigdr juanmigdr deleted the chore/stop-using-swaps-fetchToken branch January 26, 2026 09:18
@juanmigdr
Copy link
Member Author

@metamaskbot publish-preview

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.

5 participants