This repository was archived by the owner on Jul 31, 2026. It is now read-only.
feat: add assets migration foundation - #360
Closed
ulissesferreira wants to merge 2 commits into
Closed
Conversation
Adds the wallet messenger boundary, migration-stage resolver, and controller adapter. This is the foundation of the WPN-1478 PR chain. Jira: WPN-1478
Records coverage thresholds introduced by the migration foundation tests. Jira: WPN-1478
4 tasks
Contributor
Author
|
Tentative approach under old ASSETS-2 shape — superseded by WPN-1478 redesign. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Explanation
This is the first of 4 stacked PRs for WPN-1478: Migrate Tron Snap to consume AssetsController (staged rollout, 0→3).
Current state: The Tron Snap tracks assets entirely in local Snap state — it polls the chain, persists balances internally, and fires
KeyringEvents(AccountAssetListUpdated,AccountBalancesUpdated) from the Snap. This works but bypasses the unified AssetsController that the extension and mobile clients consume, creating a fork in the asset data pipeline.This PR: Lays the infrastructure for the migration — introduces the
MigrationStageenum,resolveStage()from the Core flag (snapsAssetsMigration), a typedWalletMessengerClientwrapper, and theTronAssetsControllerAdapterthat encapsulates all controller communication. No behavioral change at runtime (stage 0 = Off, the default). This sets up the scaffolding that the next 3 PRs build on.Files: 7 new, 5 modified. +591 lines. Types, adapter, messenger client, stage resolution — all infrastructure, no functional change.
References
AssetsController:getAsset), WPN-1489 (WSS/AccountsAPI ingestion), WPN-1490 (ignore Snap events at stage 3)Checklist