Skip to content

refactor(solana-wallet-snap): remove asset pubkeys - #245

Open
ulissesferreira wants to merge 3 commits into
mainfrom
solana-remove-asset-pubkey
Open

ulissesferreira wants to merge 3 commits into
mainfrom
solana-remove-asset-pubkey

Conversation

@ulissesferreira

@ulissesferreira ulissesferreira commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

We will take 1 step backwards so we can then take 2 steps forward. We need to stop storing a field that the AssetsController can't return. We might lose some performance out of transaction history fetching but this will soon not be a problem when we start getting transaction history from controllers too.

  • Remove pubkey from the Solana TokenAsset and NftAsset models.
  • Stop copying token account pubkeys into persisted or monitored asset entities.
  • Resolve the associated token account address only when fetching transaction history, using the mint token program so Token-2022 remains supported.
  • Keep independent account, metadata, saved-history, ATA-resolution, and transaction requests parallel where applicable.

Validation

  • Formatting check passed.
  • ESLint passed for all changed source and test files.
  • Focused Jest execution was blocked because this worktree does not have a built packages/solana-wallet-snap/dist/bundle.js; the local build is also blocked by the current workspace package-resolution state for @metamask/snap-networks-utils.

This PR is based on the latest origin/main.

@ulissesferreira
ulissesferreira requested a review from a team as a code owner September 1, 2026 11:16
@ulissesferreira
ulissesferreira marked this pull request as draft September 1, 2026 11:31
@ulissesferreira
ulissesferreira force-pushed the solana-remove-asset-pubkey branch from 82ec651 to 1c9dae3 Compare September 3, 2026 16:46
@stanleyyconsensys
stanleyyconsensys marked this pull request as ready for review September 7, 2026 03:00
@stanleyyconsensys
stanleyyconsensys requested a review from a team as a code owner September 7, 2026 03:00
@stanleyyconsensys
stanleyyconsensys marked this pull request as draft September 7, 2026 03:00
@ulissesferreira
ulissesferreira force-pushed the solana-remove-asset-pubkey branch from de4c2c1 to 7158271 Compare September 17, 2026 10:12
@ulissesferreira
ulissesferreira force-pushed the solana-remove-asset-pubkey branch from 7158271 to 55feb55 Compare September 17, 2026 10:25
@sonarqubecloud

Copy link
Copy Markdown

@ulissesferreira
ulissesferreira marked this pull request as ready for review September 17, 2026 12:39
@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/bitcoin-wallet-snap@2.0.1-preview-55feb552
@metamask-previews/snap-networks-utils@1.0.0-preview-55feb552
@metamask-previews/solana-wallet-snap@6.0.0-preview-55feb552
@metamask-previews/stellar-wallet-snap@1.0.0-preview-55feb552
@metamask-previews/tron-wallet-snap@3.2.0-preview-55feb552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants