Skip to content

feat(solana-wallet-snap): use shareable permissions helpers in Solana snap - #207

Open
Julink-eth wants to merge 2 commits into
mainfrom
feat/WPN-1924-use-shared-origin-permissions-in-solana-snap
Open

feat(solana-wallet-snap): use shareable permissions helpers in Solana snap#207
Julink-eth wants to merge 2 commits into
mainfrom
feat/WPN-1924-use-shared-origin-permissions-in-solana-snap

Conversation

@Julink-eth

@Julink-eth Julink-eth commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Explanation

Replace the Solana snap’s local origin-permission map wiring and validateOrigin with the shared helpers from @metamask/snap-networks-utils.

  • permissions.ts still owns the method lists and the ConfigProvider local/test toggle. The map is built with createOriginPermissions: localhost + dapp methods in non-prod, Portfolio + empty dapp set in prod.
  • onRpcRequest and onKeyringRequest call validateOrigin(origin, method, originPermissions) from the shared package. The local wrapper in validators.ts is removed.
  • Unused @typescript-eslint/only-throw-error suppressions for that file are pruned (they existed only for the deleted UnauthorizedError throws).
    Permission surface is unchanged.

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

@Julink-eth
Julink-eth requested review from a team as code owners August 26, 2026 13:57
@Julink-eth
Julink-eth deployed to default-branch August 26, 2026 13:57 — with GitHub Actions Active
@Julink-eth Julink-eth changed the title feat(solana-wallet-snap): use shareable permissions helepers in Solan… feat(solana-wallet-snap): use shareable permissions helepers in Solana snap Aug 26, 2026
@Julink-eth Julink-eth changed the title feat(solana-wallet-snap): use shareable permissions helepers in Solana snap feat(solana-wallet-snap): use shareable permissions helpers in Solana snap Aug 26, 2026
@Julink-eth

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

1 similar comment
@Julink-eth

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-0897653c
@metamask-previews/snap-networks-utils@1.0.0-preview-0897653c
@metamask-previews/solana-wallet-snap@6.0.0-preview-0897653c
@metamask-previews/stellar-wallet-snap@0.1.0-preview-0897653c
@metamask-previews/tron-wallet-snap@3.1.0-preview-0897653c

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.

1 participant