Skip to content

perf(solana-wallet-snap): resolve Core token accounts lazily - #244

Closed
ulissesferreira wants to merge 1 commit into
ulissesferreira/wpn-1652-core-assets-adapter-6620from
pr-122-lazy-core-pubkey
Closed

perf(solana-wallet-snap): resolve Core token accounts lazily#244
ulissesferreira wants to merge 1 commit into
ulissesferreira/wpn-1652-core-assets-adapter-6620from
pr-122-lazy-core-pubkey

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

Summary

  • Avoid resolving SPL associated token account pubkeys while reading Core-backed balances and asset lists.
  • Resolve the ATA only when transaction history needs getSignaturesForAddress.
  • Preserve the existing Snap path by using the RPC-provided pubkey without fetching mint data.
  • Start account lookup, metadata lookup, saved transaction lookup, ATA resolution, and local history lookup in parallel where independent.

Validation

  • ENVIRONMENT=test yarn workspace @metamask/solana-wallet-snap exec jest --runInBand src/core/services/assets/adapters/CoreAssetsAdapter.test.ts src/core/services/assets/utils/mapControllerAsset.test.ts src/core/services/transactions/TransactionsService.test.ts
  • 3 suites passed, 28 tests passed

This PR targets the branch backing #122.

@ulissesferreira
ulissesferreira requested a review from a team as a code owner September 1, 2026 10:53
@ulissesferreira

Copy link
Copy Markdown
Contributor Author

These changes will have to be done against main for reviewability so this will be superseded by #245. In there we first start by implementing that change independent of using AssetsController for storage or not.

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.

1 participant