feat(tron-wallet-snap): route asset reads through Core when migration is on - #145
Open
ulissesferreira wants to merge 16 commits into
Conversation
…pAssetsAdapter Move snap-owned extraction helpers into shared utils, wire SnapAssetsAdapter from context into AssetsService, and rename getByKeyringAccountId to getAccountAssets.
This was referenced Aug 10, 2026
ulissesferreira
force-pushed
the
WPN-1497-implement-core-assets-adapter
branch
from
August 10, 2026 14:13
714b17d to
3550d24
Compare
ulissesferreira
force-pushed
the
WPN-1497-route-assets-logic-based-on-feature-flag
branch
from
August 10, 2026 14:14
ba86a26 to
25080b8
Compare
This was referenced Aug 10, 2026
…om CI Apply oxfmt to extracted asset utils and set snap.manifest.json shasum to the Linux CI build output so the build job's clean-working-tree check passes.
Satisfy import-x/consistent-type-specifier-style for CI eslint.
Introduce CoreAssetsAdapter with AssetsController reads and snap-owned fetch/publish helpers. Wire it into AssetsService unused pending routing.
ulissesferreira
force-pushed
the
WPN-1497-implement-core-assets-adapter
branch
from
August 10, 2026 15:07
3550d24 to
a42b752
Compare
… is on Add feature-flag resolution and route fungible reads / snap-owned saveMany through CoreAssetsAdapter when the Tron assets migration flag is active.
…ation is on When the Tron assets migration flag is active, fetchAssetsAndBalancesForAccount uses CoreAssetsAdapter so only snap-owned assets are fetched on-chain.
ulissesferreira
force-pushed
the
WPN-1497-route-assets-logic-based-on-feature-flag
branch
from
August 10, 2026 15:35
46681f7 to
e73dd2e
Compare
ulissesferreira
force-pushed
the
WPN-1497-implement-core-assets-adapter
branch
from
August 10, 2026 16:31
c043490 to
176828a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RemoteFeatureFlagsProviderintoAssetsServiceand resolve the Tron assets migration flag via#shouldReturnAssetsFromCoregetAccountAssetByID,getAccountAssetsByIDs,getAccountAssets,fetchAssetsAndBalancesForAccount, andsaveManythrough Core when migration is activePart of WPN-1497. Stack:
Replaces outdated #127 / #141.
Test plan
yarn workspace @metamask/tron-wallet-snap run buildyarn workspace @metamask/tron-wallet-snap run jest --no-coverage src/services/assets/AssetsService.test.tssaveManyemits only snap-owned assets and does not persist fungibles locally