Skip to content

feat(tron-wallet-snap): remove assets migration feature-flag routing - #97

Draft
ulissesferreira wants to merge 2 commits into
WPN-1497-core-adapter-routingfrom
WPN-1497-remove-assets-migration-flag
Draft

feat(tron-wallet-snap): remove assets migration feature-flag routing#97
ulissesferreira wants to merge 2 commits into
WPN-1497-core-adapter-routingfrom
WPN-1497-remove-assets-migration-flag

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

Summary

  • Remove SnapsAssetsMigrationStage / remote feature-flag resolution from AssetsService and SnapAssetsAdapter
  • Always route fungible reads (getAccountAssetByID, getAccountAssetsByIDs, getAccountAssetsByScope) through Core AssetsController via AssetsProvider
  • Keep snap-owned protocol assets (energy, bandwidth, staking, lock/withdrawal, rewards) on the Snap adapter for sync, reads, and keyring events
  • Drop RemoteFeatureFlagController:getState messenger endowment and @metamask/remote-feature-flag-controller devDependency

PR chain

#90#91#92#95#96this PR

Test plan

  • yarn workspace @metamask/tron-wallet-snap run jest --no-coverage src/services/assets/AssetsService.test.ts
  • CI green (manifest shasum may need Linux CI value)

After rollout, always route fungible reads through AssetsController via
AssetsProvider. Snap-owned protocol assets remain on the Snap adapter.
Remove RemoteFeatureFlagController endowment and migration stage logic.
@ulissesferreira
ulissesferreira requested review from a team as code owners August 2, 2026 23:53
@ulissesferreira
ulissesferreira marked this pull request as draft August 3, 2026 09:19
…sProvider routing

- Slim SnapAssetsAdapter to snap-owned fetch/save/read only (fetchSnapOwnedAssetsForAccount)
- Move handler logic (metadata, conversions, market data, historical prices) into AssetsService
- Add syncSnapOwnedAssets for cron sync; AccountsService.synchronizeAssets delegates to it
- Keep PR97 fungible read routing via AssetsProvider for getAccountAssetByID/ByIDs/ByScope
- Remove public saveMany, getAll, fetchAssetsAndBalancesForAccount, hasChanged from AssetsService
- Drop unused state from AssetsService constructor in context.ts
- Port and adapt unit tests; update eslint suppressions and changelog

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
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.

2 participants