Skip to content

feat(tron-wallet-snap): route fungible reads through Core AssetsController - #96

Draft
ulissesferreira wants to merge 3 commits into
WPN-1497-messenger-plumbingfrom
WPN-1497-core-adapter-routing
Draft

feat(tron-wallet-snap): route fungible reads through Core AssetsController#96
ulissesferreira wants to merge 3 commits into
WPN-1497-messenger-plumbingfrom
WPN-1497-core-adapter-routing

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

Summary

  • Introduce CoreAssetsAdapter and mapControllerAsset for Core AssetsController reads
  • Route fungible asset reads (TRX, TRC10, TRC20) based on resolved migration stage (Off / ReadWithFallback / Read)
  • Snap-owned assets always use SnapAssetsAdapter; narrow sync/saveMany to snap-owned when Core stage is active
  • Manifest endows AssetsController:getAsset and AssetsController:getAssets

Part 2 of 2 split from #94. Part 1: WPN-1497-messenger-plumbing.

Jira

Test plan

  • yarn workspace @metamask/tron-wallet-snap build
  • yarn workspace @metamask/tron-wallet-snap run jest --no-coverage (898 tests)

Stacks on PR 1 (WPN-1497-messenger-plumbing), which stacks on #92.

Supersedes #94.

@socket-security

socket-security Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​metamask-previews/​snap-networks-utils@​0.0.0-preview-8589132721008887100

View full report

ulissesferreira and others added 2 commits August 3, 2026 00:20
…vider

Adopt @metamask/snap-networks-utils AssetsProvider from day one for
account-scoped AssetsController reads (getAccountAssetByID,
getAccountAssetsByIDs, getAccountAssetsByScope) behind migration-stage
routing in AssetsService. Map controller Asset shapes to private
AssetEntity via mapControllerAsset; protocol assets remain Snap-owned
through SnapAssetsAdapter. CoreAssetsAdapter is not used.

Co-authored-by: Cursor <cursoragent@cursor.com>
…red AssetsProvider

Wire @metamask/tron-wallet-snap to @metamask-previews/snap-networks-utils@0.0.0-preview-8589132
(published from PR #82) via npm alias, replacing workspace:^ to satisfy yarn constraints.
Allow the preview dependency range in yarn.config.cjs until PR #82 merges.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ulissesferreira
ulissesferreira force-pushed the WPN-1497-messenger-plumbing branch from b73d987 to 7302e9d Compare August 2, 2026 23:20
@ulissesferreira
ulissesferreira force-pushed the WPN-1497-core-adapter-routing branch from 6f74385 to 1ad0e7a Compare August 2, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant