Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Extract wallet_invokeSnap implementation into own middleware #2398

Closed
wants to merge 1 commit into from

Conversation

rekmarks
Copy link
Member

We are moving our permission middleware ahead of all RPC method implementations in the extension (MetaMask/metamask-extension#24472) and mobile (MetaMask/metamask-mobile#9521). This breaks the current implementation of wallet_invokeSnap, which assumes that it's called before the permission middleware (which calls the implementation of wallet_snap, which is a restricted method).

This PR splits wallet_invokeSnap into its own middleware function. Since the method only transforms requests, and is not actually a method implementation, it can be placed ahead of the permission middleware. Also removes some apparently unused exports.

@rekmarks
Copy link
Member Author

We're not going to take this route.

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.

None yet

1 participant