Skip to content

refactor(solana-wallet-snap): extract SnapAssetsAdapter for Solana balance reads - #121

Draft
ulissesferreira wants to merge 3 commits into
ulissesferreira/wpn-1652-align-assets-service-api-6620from
ulissesferreira/wpn-1652-snap-assets-adapter-6620
Draft

refactor(solana-wallet-snap): extract SnapAssetsAdapter for Solana balance reads#121
ulissesferreira wants to merge 3 commits into
ulissesferreira/wpn-1652-align-assets-service-api-6620from
ulissesferreira/wpn-1652-snap-assets-adapter-6620

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

Explanation

Part of migrating the Solana assets-controller staged migration from snap-solana-wallet#636 into this monorepo (PR 2 of 6, Lane A / feature-flag path only).

  • Extract balance fetch/persist/read logic into adapters/SnapAssetsAdapter.ts
  • AssetsService becomes a thin facade that delegates account asset reads/saves to the adapter
  • Metadata / market-data methods remain on AssetsService for now
  • No Core routing yet — Snap adapter remains the sole read path

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 

cursoragent and others added 3 commits August 5, 2026 13:44
…ks-utils

Add getAccountAssetByID, getAccountAssetsByIDs, getAccountAssetsByScope,
and getAccountAssetsForAllActiveScopes. Update Keyring, Send, send render,
and refreshSend to use the new API. No behavior change — still reads from
Snap-owned assetEntities via AssetsRepository.

Migrated from MetaMask/snap-solana-wallet#635.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
Move balance fetch/persist/read logic into SnapAssetsAdapter. AssetsService
delegates to a single adapter — no Core routing yet.

Migrated from MetaMask/snap-solana-wallet#636.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
@cursor
cursor Bot force-pushed the ulissesferreira/wpn-1652-align-assets-service-api-6620 branch from f5ec399 to ed3340c Compare August 5, 2026 18:09
@ulissesferreira ulissesferreira changed the title refactor(WPN-1652): extract SnapAssetsAdapter for Solana balance reads refactor(solana-wallet-snap): extract SnapAssetsAdapter for Solana balance reads Aug 6, 2026
@cursor
cursor Bot force-pushed the ulissesferreira/wpn-1652-align-assets-service-api-6620 branch 3 times, most recently from 11fe525 to eef1038 Compare August 6, 2026 15:18
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