cherrypick: fix: wallet_addEthereumChain does not attach a result under certain conditions (#26726)#26733
Merged
adonesky1 merged 1 commit intoVersion-v12.1.1from Aug 29, 2024
Conversation
…in conditions (#26726) ## **Description** Fix issue where `wallet_addEthereumChain` does not attach a result to the response object when the currently selected rpcUrl matches the request. This would cause the request to get "stuck" in the `QueuedRequestController` queue, preventing the queue from progressing and causing confusing behavior. [](https://codespaces.new/MetaMask/metamask-extension/pull/26726?quickstart=1) ## **Related issues** Fixes: #26706 ## **Manual testing steps** 1. Go to https://chainlist.org/?chain=56&search=blast 2. Connect the wallet and add Blast Mainnet (For other chains it appears Chainlist cycles to the next rpcUrl you don't have which avoids this bug, so use Blast) 3. After successfully adding the network, attempt to add Blast again. Nothing should happen. 4. Then go to https://faucet.quicknode.com/blast/sepolia (or any dapp where your wallet isn't already connected) and attempt to connect 5. You should be able to connect as usual ## **Screenshots/Recordings** ### **Before** https://github.com/user-attachments/assets/b997027f-1c62-4279-87c6-0fe70989abb3 ### **After** https://github.com/user-attachments/assets/08307a88-8f6f-44cd-9b75-877aadb1805a ## **Pre-merge author checklist** - [ ] 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. ## **Pre-merge reviewer checklist** - [ ] 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.
Contributor
|
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.1.1 #26733 +/- ##
================================================
Coverage 69.80% 69.80%
================================================
Files 1370 1370
Lines 48739 48740 +1
Branches 13438 13438
================================================
+ Hits 34019 34022 +3
+ Misses 14720 14718 -2 ☔ View full report in Codecov by Sentry. |
Collaborator
Builds ready [2d4c53c]
Page Load Metrics (66 ± 16 ms)
|
Gudahtt
approved these changes
Aug 29, 2024
Member
Gudahtt
left a comment
There was a problem hiding this comment.
LGTM! I went through the manual testing steps, and it seems to work as expected
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix issue where
wallet_addEthereumChaindoes not attach a result to the response object when the currently selected rpcUrl matches the request.This would cause the request to get "stuck" in the
QueuedRequestControllerqueue, preventing the queue from progressing and causing confusing behavior.Related issues
Fixes: #26706
Manual testing steps
Screenshots/Recordings
Before
Screen.Recording.2024-08-28.at.1.37.50.PM.mov
After
Screen.Recording.2024-08-28.at.1.33.16.PM.mov
Pre-merge author checklist
Standards.
Pre-merge reviewer checklist
Description
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist