MetaMask / core

This monorepo is a collection of packages used across multiple MetaMask clients
MIT License
294 stars 190 forks source link

Encapsulate snap update permission operations in `PermissionController` #871

Open rekmarks opened 2 years ago

rekmarks commented 2 years ago

The SnapController.updateSnap() method performs some permission calculations that should occur in the PermissionController. In particular, it compares the permissions of an existing snap with that of a new version, revokes ones that no longer exist, and grants ones that were added. It accomplishes this by calling PermissionController actions. Ideally, these operations would be encapsulated within the PermissionController, while the approval request is managed by the SnapController.

rekmarks commented 7 months ago

This is likely to be fixed by #4163 and related work.