Skip to content

[FEATURE FLAG] feat: migrate assets domain to use the AssetsController - #77

Closed
ulissesferreira wants to merge 8 commits into
mainfrom
ASSETS-2-feature-flagged
Closed

[FEATURE FLAG] feat: migrate assets domain to use the AssetsController#77
ulissesferreira wants to merge 8 commits into
mainfrom
ASSETS-2-feature-flagged

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

Summary

  • Adds Core messenger types and endowment so the Tron snap can call AssetsController actions from MetaMask Core.
  • Introduces SNAP_OWNED_ASSETS, mapControllerAsset, and an assets migration mode resolver to route fungible asset reads through AssetsController when the feature flag is enabled, with legacy AssetsService behavior as fallback.
  • Updates AssetsService, client wiring, and tests to support the feature-flagged migration path.

Test plan

  • yarn workspace @metamask/tron-wallet-snap build
  • yarn workspace @metamask/tron-wallet-snap run test
  • Verify fungible assets resolve via AssetsController when the migration flag is on
  • Verify legacy fungible asset behavior when the migration flag is off

Made with Cursor

ulissesferreira and others added 7 commits July 31, 2026 00:55
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@ulissesferreira
ulissesferreira requested review from a team as code owners July 31, 2026 00:17
@ulissesferreira ulissesferreira changed the title feat: ASSETS-2 — feature-flagged AssetsController migration [FEATURE FLAG] feat: migrate assets domain to use the AssetsController Jul 31, 2026
@ulissesferreira
ulissesferreira marked this pull request as draft July 31, 2026 10:32
…pters

Move legacy assets logic into SnapAssetsAdapter, add CoreAssetsAdapter for
AssetsController reads, and keep AssetsService as a thin facade with inline
stage routing. Resolve migration stage from remote flags in the Snap with a
hardcoded fallback constant instead of a separate mode module or env vars.
@ulissesferreira

Copy link
Copy Markdown
Contributor Author

Superseded by the WPN-1497 chain (#90#91#92#95#96), which ends in two optional tails (direct core vs feature-flagged core). Closing per discussion.

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