You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
`wallet_revokePermissions` has been live on extension for ~1 year. We
did not add it to Mobile at the time because of controllers versions
being behind. We are adding it now.
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
## **Related issues**
Fixes: MetaMask/MetaMask-planning#4426
## **Manual testing steps**
1. Go to a dapp (example used in this case was https://app.uniswap.org)
2. Connect wallet to dapp via dapp UI
3. Disconnect wallet from dapp via dapp UI
4. Make sure permissions have been revoked (either through mobile wallet
UI or console sending a
[wallet_getPermissions](https://docs.metamask.io/wallet/reference/json-rpc-methods/wallet_getpermissions/)
request)
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
https://github.com/user-attachments/assets/a27be969-2b40-4ab1-8557-ffeea55f2df0
### **After**
https://github.com/user-attachments/assets/cff4d39e-3868-41db-864a-8ff60ec9791b
## **Pre-merge author checklist**
- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
//@ts-expect-error {JsonRpcError} will be fixed by a future bump. [Reference](https://github.com/MetaMask/metamask-mobile/pull/14091/files#r2009831015)
* For now, we check if either eth_accounts or endowment:permitted-chains are sent. If either of those is sent, we revoke both.
425
+
* This manual filtering will be handled / refactored once we implement [CAIP-25 permissions](https://github.com/MetaMask/MetaMask-planning/issues/4129)
0 commit comments