MetaMask / snaps-directory

Explore community-built Snaps to customize your web3 experience via our official directory.
https://snaps.metamask.io/
14 stars 10 forks source link

Use `wallet_getAllSnaps` and revoke permissions post-install #388

Closed hmalik88 closed 3 months ago

hmalik88 commented 4 months ago

Closes #1896

Swapping out wallet_getSnaps for wallet_getAllSnaps so that the directory doesn't need permission to get a list of the currently installed snaps. wallet_revokePermissions is invoked to remove the directory's wallet_snap permission on every install.

github-actions[bot] commented 4 months ago

Commit e252fb44898a9534311520407f448df5ed6ff642 successfully pushed to staging website:

https://metamask.github.io/snaps-directory-staging/pr/388/

hmalik88 commented 4 months ago

Looks good to me. Just wondering if we can assume that wallet_getAllSnaps is available, since we introduced it quite recently?

I suppose we can hold off on merging this PR until we know it has made its way to stable.

FrederikBolding commented 3 months ago

@Mrtenz The RPC method was introduced in extension 11.9. Seems safe enough to start using?