Skip to content

Conversation

@salimtb
Copy link
Contributor

@salimtb salimtb commented Jan 8, 2026

Explanation

This PR introduces a new @metamask/assets-controller package as a placeholder for future consolidation of asset tracking functionality.

Current state:
Asset tracking functionality (account balances, token balances, asset detection) is currently spread across multiple controllers in the @metamask/assets-controllers package.

Solution:
This PR creates an empty @metamask/assets-controller package as a foundation for future work to consolidate asset tracking into a single, unified controller. The package currently exports nothing and serves as a placeholder with TODOs indicating the intended scope:

  • Account balance tracking
  • Token balance tracking
  • Asset detection

No functional changes are included in this PR.

References

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

Introduces a new placeholder package for future asset tracking consolidation.

  • Adds @metamask/assets-controller with a minimal AssetsController (empty state), exports, unit tests, README, LICENSE, CHANGELOG, Jest/TypeDoc/TS configs, and build scripts
  • Updates monorepo wiring: adds package to README (list + graph), CODEOWNERS, teams.json, root tsconfig.json and tsconfig.build.json references, and yarn.lock entry

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

@salimtb salimtb marked this pull request as ready for review January 8, 2026 16:05
@salimtb salimtb requested a review from a team as a code owner January 8, 2026 16:05
Copy link
Contributor

Choose a reason for hiding this comment

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

Two questions:

  1. What do you think about copying and pasting one of the controllers in the sample-controllers package? This way we can keep the general look and feel for a controller consistent across all packages.

  2. I see that we are creating a new package called assets-controller, when we already have a package called assets-controllers (with an "s"). I'm a bit worried this will be a constant source of confusion, and so perhaps we shouldn't make a new package yet? Or — are there any near-term plans to split apart assets-controllers?

Copy link
Contributor Author

@salimtb salimtb Jan 12, 2026

Choose a reason for hiding this comment

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

@mcmire yes, there are near-term plans to split apart assets-controllers. The goal is to deprecate the existing assets-controllers (plural) package and break it into several focused, single-responsibility packages:

  • @metamask/assets-controller - consolidated asset tracking (balances, detection)
  • Other controllers from the package will be split into their own dedicated packages as well

The naming is intentional:

  • assets-controllers = legacy "kitchen sink" package (to be deprecated)
  • assets-controller = new single unified controller

This follows the pattern we've used elsewhere in the monorepo where packages contain a single controller (e.g., @metamask/network-controller, @metamask/keyring-controller).

Once the migration is complete and assets-controllers is deprecated and deleted, the confusion will be resolved. In the meantime, we can add a note to the assets-controllers README indicating it's being deprecated and pointing to the new packages.

Copy link
Contributor

Choose a reason for hiding this comment

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

@salimtb Okay, that sounds like a great plan. Thanks for clarifying!

@salimtb salimtb requested a review from mcmire January 12, 2026 09:52
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.

4 participants