-
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
Version v11.5.2 #21949
Merged
Merged
Version v11.5.2 #21949
Conversation
This file contains 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
## **Description** Fixes bug with the Web3Provider being reinstantiated with the provider proxy before it was updated to point to the new network. This is achieved by changing the listened event from `stateChange` to `networkDidChange` ## **Related issues** Fixes: #21904 ## **Manual testing steps** 1. Change your network to Linea 2. Restart extension 3. Open extension 4. Change network to Mainnet 5. Open swaps 6. Swap 1 WETH for ETH 7. Should no longer error ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained what problem this PR is solving and how it is solved. - [x] I've linked related issues - [x] I've included manual testing steps - [ ] I've included screenshots/recordings if applicable - [ ] I’ve included tests if applicable - [ ] 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/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [x] I’ve properly set the pull request status: - [ ] In case it's not yet "ready for review", I've set it to "draft". - [x] In case it's "ready for review", I've changed it from "draft" to "non-draft". ## **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.
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. |
@danjm Should this also include #21928 ? The broken release |
`@metamask/snaps-ui` is indirectly used by `@metamask/keyring-api` but is deprecated, so we are getting an audit failure. Replacing `@metamask/snaps-ui` with `@metamask/snaps-sdk` will solve this but in the meantime we are ignoring this deprecation to unblock further merges.
13 tasks
@legobeat yes, let's include it. I just approved your PR to do that. Thank-you |
Builds ready [044a68b]
Page Load Metrics (1347 ± 359 ms)
|
…work events (#21958) While QAing v11.5.2, this issue was discovered: 1. Add a network, through the popular network list, that you have tokens on. 2. use "+ Import tokens" form to import a token that that you have on this network 3. try to swap that token for the network's native currency, fetching quotes will fail and an "Error fetching quotes" message will be shown We thought we fixed this with #21923, but the case of adding a network and then immediately trying to swap an erc20 token on that network, was not covered by that solution. The reasons for that are detailed extensively here https://consensys.slack.com/archives/GTQAGKY5V/p1700700399190349 tldr: When the `NetworkDidChange` event occurs during the network adding flow, the network's status is not yet "Available" and so the swaps controller subscriber for network changes does allow the provider to update The fix in this PR, which also covers the problem addressed by the aforementioned PR, is to only update the swaps controller's ethersProvider at the time it is needed, within the `fetchAndSetQuotes`, and to stop subscribing to network controller changes. 1. Add a network, through the popular network list, that you have tokens on. 2. use "+ Import tokens" form to import a token that that you have on this network 3. try to swap that token for the network's native currency, fetching quotes should succeed https://github.com/MetaMask/metamask-extension/assets/7499938/acc62c6c-ac67-41be-a4a9-78e7d9941043 https://github.com/MetaMask/metamask-extension/assets/7499938/3eeea1c2-9d14-4f56-9a66-4669af9ae0e1 - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained what problem this PR is solving and how it is solved. - [x] I've linked related issues - [x] I've included manual testing steps - [x] I've included screenshots/recordings if applicable - [ ] 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. - [x] I’ve properly set the pull request status: - [ ] In case it's not yet "ready for review", I've set it to "draft". - [ ] In case it's "ready for review", I've changed it from "draft" to "non-draft". - [ ] 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.
Builds ready [ec61967]
Page Load Metrics (1276 ± 381 ms)
|
I just did a final QA and it passed |
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.
[11.5.2]
Fixed