Commit 93fe233
fix: existing EVM permissions removed when a Solana Wallet Standard connection is rejected (#36283)
<!--
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**
When a dapp connects to MetaMask via EVM and the user *rejects a
subsequent connection request for SVM*, the *existing EVM connection is
closed*. This can potentially break dapp flows and edge cases where
maintaining the EVM connection is critical.
To fix this, we implemented partial revoking into the
`wallet_revokeSession` handler on
MetaMask/core#6668 so that we can then update
our solana wallet-standard provider would only revoke the solana scopes
when it is asked to disconnect, here
MetaMask/solana-wallet-standard#53.
This PR bumps all necessary packages for this to take place, fixing the
undesired EVM permissions revoke when a solana wallet standard
connection is refused.
<!--
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?
-->
[](https://codespaces.new/MetaMask/metamask-extension/pull/36283?quickstart=1)
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: Fixes existing EVM permissions removed when a Solana
Wallet Standard connection is rejected
## **Related issues**
Fixes: https://consensyssoftware.atlassian.net/browse/WAPI-413
## **Manual testing steps**
1. Go to https://orca.so
2. On dev tools console, call `window.ethereum.enable()`
3. Proceed with permission (make sure _NO PERMISSIONS for Solana are
checked_) and confirm
4. Click "Connect Wallet" button, choose "MetaMask" and proceed.
5. When wallet UI prompts to accept connection, click "Cancel" button.
6. Now, on dev tools console, call
```
await window.ethereum.request({
"method": "wallet_getPermissions",
"params": [],
});
```
7. Permission for `eth_accounts` should still be present with the
permitted account in `caveats` array.
## **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/77026a60-03e1-4293-ad8a-25f9c9c5056d
### **After**
https://github.com/user-attachments/assets/e4bca63c-3e21-4736-88fc-6d35f723d90a
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.1 parent 572ff11 commit 93fe233
3 files changed
+80
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7305 | 7305 | | |
7306 | 7306 | | |
7307 | 7307 | | |
| 7308 | + | |
| 7309 | + | |
| 7310 | + | |
| 7311 | + | |
7308 | 7312 | | |
7309 | 7313 | | |
7310 | 7314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
326 | | - | |
| 325 | + | |
| 326 | + | |
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5648 | 5648 | | |
5649 | 5649 | | |
5650 | 5650 | | |
5651 | | - | |
5652 | | - | |
5653 | | - | |
| 5651 | + | |
| 5652 | + | |
| 5653 | + | |
5654 | 5654 | | |
5655 | 5655 | | |
5656 | | - | |
5657 | | - | |
| 5656 | + | |
| 5657 | + | |
5658 | 5658 | | |
5659 | 5659 | | |
5660 | 5660 | | |
5661 | 5661 | | |
5662 | | - | |
| 5662 | + | |
5663 | 5663 | | |
5664 | 5664 | | |
5665 | 5665 | | |
| |||
6097 | 6097 | | |
6098 | 6098 | | |
6099 | 6099 | | |
| 6100 | + | |
| 6101 | + | |
| 6102 | + | |
| 6103 | + | |
| 6104 | + | |
| 6105 | + | |
| 6106 | + | |
| 6107 | + | |
| 6108 | + | |
| 6109 | + | |
| 6110 | + | |
| 6111 | + | |
| 6112 | + | |
6100 | 6113 | | |
6101 | 6114 | | |
6102 | 6115 | | |
| |||
6419 | 6432 | | |
6420 | 6433 | | |
6421 | 6434 | | |
6422 | | - | |
6423 | | - | |
6424 | | - | |
| 6435 | + | |
| 6436 | + | |
| 6437 | + | |
6425 | 6438 | | |
6426 | 6439 | | |
6427 | 6440 | | |
6428 | | - | |
6429 | | - | |
| 6441 | + | |
| 6442 | + | |
6430 | 6443 | | |
6431 | 6444 | | |
6432 | 6445 | | |
| |||
6780 | 6793 | | |
6781 | 6794 | | |
6782 | 6795 | | |
6783 | | - | |
6784 | | - | |
6785 | | - | |
6786 | | - | |
| 6796 | + | |
| 6797 | + | |
| 6798 | + | |
| 6799 | + | |
6787 | 6800 | | |
6788 | 6801 | | |
6789 | 6802 | | |
6790 | | - | |
6791 | | - | |
6792 | | - | |
| 6803 | + | |
| 6804 | + | |
| 6805 | + | |
6793 | 6806 | | |
6794 | 6807 | | |
6795 | | - | |
6796 | | - | |
6797 | | - | |
6798 | | - | |
| 6808 | + | |
| 6809 | + | |
| 6810 | + | |
| 6811 | + | |
6799 | 6812 | | |
6800 | 6813 | | |
6801 | | - | |
| 6814 | + | |
6802 | 6815 | | |
6803 | 6816 | | |
6804 | 6817 | | |
6805 | | - | |
| 6818 | + | |
6806 | 6819 | | |
6807 | 6820 | | |
6808 | 6821 | | |
| |||
6859 | 6872 | | |
6860 | 6873 | | |
6861 | 6874 | | |
6862 | | - | |
| 6875 | + | |
6863 | 6876 | | |
6864 | 6877 | | |
6865 | 6878 | | |
| |||
6887 | 6900 | | |
6888 | 6901 | | |
6889 | 6902 | | |
| 6903 | + | |
| 6904 | + | |
| 6905 | + | |
| 6906 | + | |
| 6907 | + | |
| 6908 | + | |
| 6909 | + | |
| 6910 | + | |
| 6911 | + | |
| 6912 | + | |
| 6913 | + | |
| 6914 | + | |
| 6915 | + | |
| 6916 | + | |
| 6917 | + | |
| 6918 | + | |
| 6919 | + | |
| 6920 | + | |
| 6921 | + | |
| 6922 | + | |
| 6923 | + | |
| 6924 | + | |
| 6925 | + | |
| 6926 | + | |
| 6927 | + | |
| 6928 | + | |
| 6929 | + | |
| 6930 | + | |
6890 | 6931 | | |
6891 | 6932 | | |
6892 | 6933 | | |
| |||
7554 | 7595 | | |
7555 | 7596 | | |
7556 | 7597 | | |
7557 | | - | |
7558 | | - | |
7559 | | - | |
| 7598 | + | |
| 7599 | + | |
| 7600 | + | |
7560 | 7601 | | |
7561 | 7602 | | |
7562 | 7603 | | |
7563 | 7604 | | |
7564 | 7605 | | |
7565 | 7606 | | |
7566 | 7607 | | |
7567 | | - | |
| 7608 | + | |
7568 | 7609 | | |
7569 | 7610 | | |
7570 | 7611 | | |
| |||
32106 | 32147 | | |
32107 | 32148 | | |
32108 | 32149 | | |
32109 | | - | |
32110 | | - | |
| 32150 | + | |
| 32151 | + | |
32111 | 32152 | | |
32112 | 32153 | | |
32113 | 32154 | | |
| |||
32142 | 32183 | | |
32143 | 32184 | | |
32144 | 32185 | | |
32145 | | - | |
| 32186 | + | |
32146 | 32187 | | |
32147 | 32188 | | |
32148 | 32189 | | |
| |||
0 commit comments