Skip to content

feat(tron-wallet-snap): add CoreAssetsAdapter and initialize in AssetsService - #141

Closed
ulissesferreira wants to merge 2 commits into
mainfrom
ulissesferreira/wpn-1497-core-adapter-init-d433
Closed

feat(tron-wallet-snap): add CoreAssetsAdapter and initialize in AssetsService#141
ulissesferreira wants to merge 2 commits into
mainfrom
ulissesferreira/wpn-1497-core-adapter-init-d433

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

Explanation

This is the first half of the WPN-1497 core adapter work. It introduces the Core adapter infrastructure without changing runtime asset routing behavior.

  • Adds CoreAssetsAdapter and mapControllerAsset for AssetsController integration
  • Refactors SnapAssetsAdapter to accept ConfigProvider via DI (removes direct context import)
  • Wires snapAssetsAdapter and coreAssetsAdapter in context.ts
  • Updates AssetsService to accept injected adapters and store CoreAssetsAdapter, but all reads/writes still delegate to SnapAssetsAdapter
  • Leaves AssetsService.test.ts unchanged from main (no migration routing assertions)

The follow-up PR on ulissesferreira/wpn-1497-core-adapter-routing-9863 adds feature-flagged routing through Core.

References

  • Split from ulissesferreira/wpn-1497-core-adapter-routing-9863
  • WPN-1497

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 10, 2026 12:42
…sService

Introduce CoreAssetsAdapter, mapControllerAsset, and SnapAssetsAdapter DI
refactors. Wire adapters in context and store CoreAssetsAdapter on
AssetsService without routing reads through Core yet.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
…tAssetsByScope

No production caller uses scope-scoped reads through the Snap adapter.
CoreAssetsAdapter still uses AssetsProvider.getAccountAssetsByScope internally.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct implementation of the Adapters means they should be initialized outside and passed into the AssetsService

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