Added wallet_revokePermissions rpc method#21948
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
| revokePermissionsForOrigin: (permissionKeys) => { | ||
| this.permissionController.revokePermissions({ | ||
| [origin]: permissionKeys, | ||
| }); |
There was a problem hiding this comment.
@shanejonas and I discussed and we may want to change the method signature for the hook so we don't necessarily have to do this formatting here. But for now this works.
adonesky1
left a comment
There was a problem hiding this comment.
I've tested and it works for me! LGTM. Could we just get a lil PR description
|
@metamaskbot update-policies |
|
Policies updated |
|
Tested. Working for me too |
|
@SocketSecurity ignore @metamask/permission-controller@6.0.0 |
|
@SocketSecurity ignore @metamask/approval-controller@5.0.0 |
Builds ready [8d38120]
Page Load Metrics (497 ± 246 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
This PR adds
wallet_revokePermissionsrpc method support that was added inpermission-controller/rpc-methodsthat went in this PR MetaMask/core#1889.All that is needed is to add the hook as the rpc-method gets automatically added here.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/1681
Manual testing steps
Send Requestto request permissionsSend Requestto get the permissionsSend Requestto get the permissionsPre-merge author checklist
Pre-merge reviewer checklist