Skip to content

feat(solana-wallet-snap): route asset reads through Core when migration is on - #123

Draft
ulissesferreira wants to merge 3 commits into
ulissesferreira/wpn-1652-core-assets-adapter-6620from
ulissesferreira/wpn-1476-migrate-solana-assets-controller-6620
Draft

feat(solana-wallet-snap): route asset reads through Core when migration is on#123
ulissesferreira wants to merge 3 commits into
ulissesferreira/wpn-1652-core-assets-adapter-6620from
ulissesferreira/wpn-1476-migrate-solana-assets-controller-6620

Conversation

@ulissesferreira

@ulissesferreira ulissesferreira commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Explanation

Part of migrating the Solana assets-controller staged migration into this monorepo (PR 4 of 6). Follows the Tron WPN-1497 routing approach from #145: a thin if in AssetsService rather than inlining AssetsProvider calls.

Solana is simpler than Tron: there are no snap-owned assets, so the flag-on path does not fetch, persist, or publish leftover Snap balances, and does not monitor addresses for snap-owned changes.

  • Pass RemoteFeatureFlagsProvider into AssetsService and resolve the Solana assets migration flag via #shouldReturnAssetsFromCore / isUsingCoreAssets
  • Route getAccountAssetByID, getAccountAssetsByIDs, getAccountAssetsByScope, and getAccountAssets through CoreAssetsAdapter when migration is active
  • When migration is on, fetch returns [] and saveMany is a no-op (Core already tracks fungibles)
  • KeyringAccountMonitor still discovers receive transactions over websockets, but skips balance persistence when the flag is on
  • When off, reads/fetch/save still go through SnapAssetsAdapter
  • AssetsService stays a thin facade

References

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
Open in Web Open in Cursor 

@ulissesferreira ulissesferreira changed the title feat(WPN-1476): route Solana asset reads via migration stages feat(solana-wallet-snap): route Solana asset reads via migration stages Aug 6, 2026
@cursor
cursor Bot force-pushed the ulissesferreira/wpn-1476-migrate-solana-assets-controller-6620 branch from 10ba0a6 to 116e8da Compare August 14, 2026 15:50
@cursor cursor Bot changed the title feat(solana-wallet-snap): route Solana asset reads via migration stages feat(solana-wallet-snap): route asset reads through Core when migration is on Aug 14, 2026
cursoragent and others added 2 commits August 14, 2026 16:13
…on is on

Pass RemoteFeatureFlagsProvider into AssetsService and route
getAccountAssetByID, getAccountAssetsByIDs, getAccountAssetsByScope,
getAccountAssets, fetch, and saveMany through CoreAssetsAdapter when the
Solana assets migration flag is active.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
…tion is on

Route reads through CoreAssetsAdapter when the Solana assets flag is
active. Fetch and save are no-ops because Solana has no snap-owned
assets. KeyringAccountMonitor still discovers transactions but no
longer persists balances from websocket notifications.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
@cursor
cursor Bot force-pushed the ulissesferreira/wpn-1476-migrate-solana-assets-controller-6620 branch from 116e8da to feeef1d Compare August 14, 2026 16:16
…t shasum

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