Skip to content
This repository was archived by the owner on Jul 31, 2026. It is now read-only.

refactor: extract SnapAssetsAdapter from AssetsService - #383

Draft
ulissesferreira wants to merge 1 commit into
mainfrom
WPN-1497-snap-assets-adapter
Draft

refactor: extract SnapAssetsAdapter from AssetsService#383
ulissesferreira wants to merge 1 commit into
mainfrom
WPN-1497-snap-assets-adapter

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

Summary

  • Extract Snap-owned asset reads/fetches into SnapAssetsAdapter, leaving AssetsService as a thin facade over that adapter
  • Rename asset accessors to clearer names (getAccountAssetByID, getAccountAssetsByIDs, getAccountAssets) and move account sync orchestration into AssetsService.synchronizeAccounts
  • Update call sites and tests for this structural change only — no AssetsController, migration stages, or behavior changes

Test plan

  • yarn build:snap && yarn test -- packages/snap/src/services/assets/
  • yarn test -- packages/snap/src/services/accounts/AccountsService.test.ts
  • yarn test -- packages/snap/src/handlers/clientRequest/clientRequest.test.ts
  • Spot-check send/confirm flows still resolve TRX/bandwidth/energy via renamed asset getters
  • Confirm no @metamask/assets-controller / migration-stage wiring landed in this PR

Move Snap-owned asset reads/fetches into an adapter and thin AssetsService
to a facade with clearer method names, with no behavior change.
@ulissesferreira
ulissesferreira requested a review from a team as a code owner July 29, 2026 09:24
@ulissesferreira
ulissesferreira marked this pull request as draft August 4, 2026 09:45
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