-
-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify
wallet_requestPermissions
implementation (#3911)
## Explanation The type for the RPC method hook `requestPermissionsForOrigin` did not previously match the implementation `PermissionController.requestPermission`. This PR rectifies that and thus simplifies the implementation of the RPC method by removing effectively dead code. Previously we were passing in a string as the optional options bag. Since this options bag has sane defaults, those were always used: https://github.com/MetaMask/core/blob/main/packages/permission-controller/src/PermissionController.ts#L1884 With this change, we just always use the options bag defaults and can remove complexity from the RPC implementation. ## Changelog I'm not sure this warrants a changelog entry tbh. ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate
- Loading branch information
1 parent
4433150
commit fd07735
Showing
2 changed files
with
3 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters