-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cherry-pick: remove methods from array used to determine which requests should be enqueued because they can be safely passed through (#27315) #27373
Conversation
…d be enqueued because they can be safely passed through (#27315) Fix issues that arise when a STX is initated in a dapp and subsequent method calls were being unnecessarily queued until the STX was complete. The following methods can be safely removed from the list of methods we use to determine whether a request should be queued or executed immediately: - 'wallet_addEthereumChain' - 'wallet_requestPermissions', - 'wallet_requestSnaps', - 'eth_decrypt', - 'eth_requestAccounts', - 'eth_getEncryptionPublicKey', [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27315?quickstart=1) Fixes: #27098 1. Make sure you have STX enabled from settings 2. Navigate to https://docs.metamask.io/wallet/reference/eth_sendtransaction/ 3. Connect the wallet and switch networks to Sepolia 4. Trigger a TX (call run request) 5. Confirm the transaction and see the STX pending screen 6. Go to test dapp 7. Click Connect --> this needs to happen while STX is pending 8. See that you are able to connect <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> https://github.com/user-attachments/assets/10be9a20-a22e-4be4-83f6-2bb66ad7a7fa `wallet_requestPermissions`: https://github.com/user-attachments/assets/a8ee940c-8d56-4107-8cb1-3683fd244cad `wallet_requestSnaps` https://github.com/user-attachments/assets/b4a57a14-8877-4081-82f6-99f2edc9e837 `eth_requestAccounts` https://github.com/user-attachments/assets/91958cc5-a006-43a4-b4db-37e4b22f07d1 `wallet_addEthereumChain` https://github.com/user-attachments/assets/23265cf1-3cfb-4e9c-9ea2-599d449d291e - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] 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.
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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## Version-v12.3.0 #27373 +/- ##
===================================================
- Coverage 70.24% 70.14% -0.10%
===================================================
Files 1426 1432 +6
Lines 50239 50430 +191
Branches 13954 13989 +35
===================================================
+ Hits 35289 35371 +82
- Misses 14950 15059 +109 ☔ View full report in Codecov by Sentry. |
Builds ready [3e5fc36]
Page Load Metrics (1706 ± 56 ms)
|
No release label on PR. Adding release label release-12.3.0 on PR, as PR was cherry-picked in branch 12.3.0. |
Fix issues that arise when a STX is initated in a dapp and subsequent method calls were being unnecessarily queued until the STX was complete.
The following methods can be safely removed from the list of methods we use to determine whether a request should be queued or executed immediately:
Fixes: #27098
Before-wallet_requestSnaps.mov
wallet_requestPermissions
:Screen.Recording.2024-09-20.at.1.11.57.PM.mov
wallet_requestSnaps
Screen.Recording.2024-09-20.at.1.41.04.PM.mov
eth_requestAccounts
Screen.Recording.2024-09-20.at.1.14.44.PM.mov
wallet_addEthereumChain
Screen.Recording.2024-09-20.at.1.01.45.PM.mov
I've followed MetaMask Contributor Docs and MetaMask Extension Coding
Standards.
I've completed the PR template to the best of my ability
I’ve included tests if applicable
I’ve documented my code using JSDoc format if applicable
I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
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.
Description
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist