This repository was archived by the owner on Jun 12, 2023. It is now read-only.
fix: issues after MetaMask update with breaking changes #244
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the following issues:
wallet_enable
method has been replaced withwallet_requestSnaps
, passing params as an object, not an array. https://docs.metamask.io/guide/snaps-rpc-api.html#wallet-requestsnapswallet_snap_*
should now be sent with the params as a single object, not as an array. https://docs.metamask.io/guide/snaps-rpc-api.html#wallet-snapendowment:rpc
permission should now be granted to the snap in order to receive RPC calls. My assumption is that only thedapps
property needs to be true and not thesnaps
property. https://docs.metamask.io/guide/snaps-permissions.html#endowment-rpcSomething seems to go wrong with linking the packages when running the demo locally, since I get the following error:
However, I've been able to test the RPC changes in my local project and that seems to work fine.
The only problem is that I still get the error about the snap permissions and I'm not sure if we can even test that properly without first deploying the new snap version and installing it in MetaMask.