Skip to content
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
mainfrom
WPN-1497-migration-foundation
Closed

feat: add assets migration foundation#360
ulissesferreira wants to merge 2 commits into
mainfrom
WPN-1497-migration-foundation

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

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 MigrationStage enum, resolveStage() from the Core flag (snapsAssetsMigration), a typed WalletMessengerClient wrapper, and the TronAssetsControllerAdapter that 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

  • Parent: WPN-1478 (Migrate Tron Snap to consume AssetsController)
  • Sub-task: WPN-1497 (Stage 0→1: route reads through getAsset with fallback)
  • Depends on Core: WPN-1473 (AssetsController:getAsset), WPN-1489 (WSS/AccountsAPI ingestion), WPN-1490 (ignore Snap events at stage 3)

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

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
@ulissesferreira

Copy link
Copy Markdown
Contributor Author

Tentative approach under old ASSETS-2 shape — superseded by WPN-1478 redesign.

@ulissesferreira
ulissesferreira deleted the WPN-1497-migration-foundation branch July 24, 2026 18:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant