Skip to content

feat(stellar-wallet-snap): use shareable permissions helpers in Stellar snap - #212

Open
Julink-eth wants to merge 1 commit into
mainfrom
feat/WPN-1926-use-shared-origin-permissions-in-stellar-snap
Open

feat(stellar-wallet-snap): use shareable permissions helpers in Stellar snap#212
Julink-eth wants to merge 1 commit into
mainfrom
feat/WPN-1926-use-shared-origin-permissions-in-stellar-snap

Conversation

@Julink-eth

Copy link
Copy Markdown
Contributor

Explanation

Replace the Stellar 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. The map is built with createOriginPermissions: Portfolio is registered with an empty dapp method set (every dapp call is rejected), and the MetaMask origin keeps the existing keyring methods. Stellar has no local/test origin toggle, and this PR does not add one.
  • KeyringHandler calls validateOrigin(origin, method, originPermissions) from the shared package. The local wrapper in requestResponse.ts is removed.
  • Existing origin tests now pass the map into the shared helper. The keyring suite mocks validateOrigin on @metamask/snap-networks-utils.
    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 a review from a team as a code owner August 26, 2026 15:03
@Julink-eth Julink-eth changed the title feat(stellar-wallet-snap): use shareable permissions helepers in Stellar snap feat(stellar-wallet-snap): use shareable permissions helpers in Stellar snap Aug 26, 2026
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