Conversation
c4089a8 to
3196bc4
Compare
3196bc4 to
fc955bd
Compare
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
useRequestQueue toggle to turn on/off Per Dapp Selected Network Feature
7 tasks
mcmire
reviewed
Nov 21, 2024
Contributor
mcmire
left a comment
There was a problem hiding this comment.
Looks good to me. I see auto-merge is on so I will wait a bit for others to respond. I will approve later if it seems okay.
jiexi
reviewed
Nov 22, 2024
| // if the request queue feature is turned off, or this method is not a confirmation method | ||
| // bypass the queue completely | ||
| if (!useRequestQueue() || !shouldEnqueueRequest(req)) { | ||
| // if this method is not a confirmation method bypass the queue completely |
Member
There was a problem hiding this comment.
Suggested change
| // if this method is not a confirmation method bypass the queue completely | |
| // if this method is not a confirmation method then bypass the queue completely |
nit. not important
jiexi
approved these changes
Nov 22, 2024
Merged
adonesky1
added a commit
that referenced
this pull request
Nov 26, 2024
## Changelog ### `@metamask/queued-request-controller` ## 7.1.0 ### Removed - `createQueuedRequestMiddleware` no longer takes a `useRequestQueue` parameter. All requests are now queued if `shouldEnqueueRequest(req)` returns true. ([#4941](#4941)) ### `@metamask/selected-network-controller ## 19.1.0 ### Removed - The `SelectedNetworkController` constructor no longer expects a `useRequestPreference` boolean nor an `onPreferencesStateChange` listener. Removal of these parameters means that `domains` state will always be added for sites that are granted permissions. ([#4941](#4941)) --------- Co-authored-by: Mark Stacey <markjstacey@gmail.com>
matthewwalsh0
pushed a commit
that referenced
this pull request
Nov 26, 2024
## Changelog ### `@metamask/queued-request-controller` ## 7.1.0 ### Removed - `createQueuedRequestMiddleware` no longer takes a `useRequestQueue` parameter. All requests are now queued if `shouldEnqueueRequest(req)` returns true. ([#4941](#4941)) ### `@metamask/selected-network-controller ## 19.1.0 ### Removed - The `SelectedNetworkController` constructor no longer expects a `useRequestPreference` boolean nor an `onPreferencesStateChange` listener. Removal of these parameters means that `domains` state will always be added for sites that are granted permissions. ([#4941](#4941)) --------- Co-authored-by: Mark Stacey <markjstacey@gmail.com>
adonesky1
added a commit
that referenced
this pull request
Dec 12, 2024
…p Selected Network Feature (#4941)" (#5065) This reverts commit 4814cf1. ## Explanation We are not yet ready to release per-dapp selected network functionality on the mobile client and with this change there is no clean way to [update the version of SelectedNetworkController](MetaMask/metamask-mobile#12434 (comment)) in the mobile client without having the Domains state starting to populate and possibly become corrupt since its not being consumed by/updated by the frontend in the expected way and may need to be migrated away when its time to actually start using the controller. Without this revert the @MetaMask/wallet-framework team is blocked from completing their goal to get both clients up to the latest versions of all controllers. ## Changelog <!-- If you're making any consumer-facing changes, list those changes here as if you were updating a changelog, using the template below as a guide. (CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or FIXED. For security-related issues, follow the Security Advisory process.) Please take care to name the exact pieces of the API you've added or changed (e.g. types, interfaces, functions, or methods). If there are any breaking changes, make sure to offer a solution for consumers to follow once they upgrade to the changes. Finally, if you're only making changes to development scripts or tests, you may replace the template below with "None". --> ### `@metamask/queued-request-controller` - **ADDED**: **BREAKING:** `createQueuedRequestMiddleware` now expects a `useRequestQueue` property in its param options ### `@metamask/selected-network-controller` - **ADDED**: **BREAKING:** `SelectedNetworkController` constructor now expects both a `useRequestQueuePreference` and a `onPreferencesStateChange` param ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate - [ ] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
This was referenced Sep 2, 2025
7 tasks
adonesky1
added a commit
that referenced
this pull request
Sep 12, 2025
…Controller (#6430) ## Explanation This PR is a re-do of #4941, which got reverted in #5065. It removes the togglability of per dapp selected network from the SelectedNetworkController. [Full explanation in the original PR here](#4941) Related: https://consensyssoftware.atlassian.net/browse/WAPI-412 ## References Fixes MetaMask/MetaMask-planning#5683 ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [ ] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes --------- Co-authored-by: Alex Donesky <adonesky@gmail.com>
github-merge-queue bot
pushed a commit
to MetaMask/metamask-extension
that referenced
this pull request
Sep 19, 2025
<!-- 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** We're updating the `SelectedNetworkController` on MetaMask/core#6430 to remove the toggleability of `Per Dapp Selected Network feature` as its now a default. This PR updates the integration to reflect this change. [See a detailed explanation here](MetaMask/core#4941). ### Package Changes `@metamask/selected-network-controller` `23.0.0 -> 24.0.0` - This change removed the togglability of per dapp selected network from the `SelectedNetworkController`. - The changes required for integration here are removing now deprecated constructor parameters, which won't cause breaking changes except for Typescript compilation errors. <!-- 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/35626?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: ## **Related issues** Fixes [WAPI-412](https://consensyssoftware.atlassian.net/browse/WAPI-412?atlOrigin=eyJpIjoiMmQ1YjlkOWFlMjc4NGExNWJhNjI2YzA4NzVmYWJkMTUiLCJwIjoiaiJ9) ## **Manual testing steps** 1. N/A ## **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 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** - [ ] 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. [WAPI-412]: https://consensyssoftware.atlassian.net/browse/WAPI-412?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
github-merge-queue bot
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Sep 22, 2025
<!-- 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** We're updating the `SelectedNetworkController` on MetaMask/core#6430 to remove the toggleability of `Per Dapp Selected Network feature` as its now a default. This PR updates the integration to reflect this change. [See a detailed explanation here](MetaMask/core#4941). ### Package Changes `@metamask/selected-network-controller` `23.0.0 -> 24.0.0` - This change removed the togglability of per dapp selected network from the `SelectedNetworkController`. - The changes required for integration here are removing now deprecated constructor parameters, which won't cause breaking changes except for Typescript compilation errors. <!-- 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? --> ## **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: ## **Related issues** Part of: [WAPI-412](https://consensyssoftware.atlassian.net/browse/WAPI-412?atlOrigin=eyJpIjoiMmQ1YjlkOWFlMjc4NGExNWJhNjI2YzA4NzVmYWJkMTUiLCJwIjoiaiJ9) ## **Manual testing steps** ## **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 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** - [ ] 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. [WAPI-412]: https://consensyssoftware.atlassian.net/browse/WAPI-412?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Alex Donesky <adonesky@gmail.com>
github-merge-queue bot
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Sep 22, 2025
<!-- 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** We're updating the `SelectedNetworkController` on MetaMask/core#6430 to remove the toggleability of `Per Dapp Selected Network feature` as its now a default. This PR updates the integration to reflect this change. [See a detailed explanation here](MetaMask/core#4941). ### Package Changes `@metamask/selected-network-controller` `23.0.0 -> 24.0.0` - This change removed the togglability of per dapp selected network from the `SelectedNetworkController`. - The changes required for integration here are removing now deprecated constructor parameters, which won't cause breaking changes except for Typescript compilation errors. <!-- 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? --> ## **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: ## **Related issues** Part of: [WAPI-412](https://consensyssoftware.atlassian.net/browse/WAPI-412?atlOrigin=eyJpIjoiMmQ1YjlkOWFlMjc4NGExNWJhNjI2YzA4NzVmYWJkMTUiLCJwIjoiaiJ9) ## **Manual testing steps** ## **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 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** - [ ] 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. [WAPI-412]: https://consensyssoftware.atlassian.net/browse/WAPI-412?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Alex Donesky <adonesky@gmail.com>
weitingsun
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Oct 15, 2025
<!-- 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** We're updating the `SelectedNetworkController` on MetaMask/core#6430 to remove the toggleability of `Per Dapp Selected Network feature` as its now a default. This PR updates the integration to reflect this change. [See a detailed explanation here](MetaMask/core#4941). ### Package Changes `@metamask/selected-network-controller` `23.0.0 -> 24.0.0` - This change removed the togglability of per dapp selected network from the `SelectedNetworkController`. - The changes required for integration here are removing now deprecated constructor parameters, which won't cause breaking changes except for Typescript compilation errors. <!-- 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? --> ## **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: ## **Related issues** Part of: [WAPI-412](https://consensyssoftware.atlassian.net/browse/WAPI-412?atlOrigin=eyJpIjoiMmQ1YjlkOWFlMjc4NGExNWJhNjI2YzA4NzVmYWJkMTUiLCJwIjoiaiJ9) ## **Manual testing steps** ## **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 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** - [ ] 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. [WAPI-412]: https://consensyssoftware.atlassian.net/browse/WAPI-412?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Alex Donesky <adonesky@gmail.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explanation
The "Select networks for each site" preference toggle on the experimental settings page has been live for many releases now since the toggle has been turned on by default. We meant to remove it a while ago.
This PR removes the togglability of per dapp selected network from the
SelectedNetworkControllerandQueuedRequestMiddlewareThe extension to integrate this change will also have to implement a migration to remove this state.
Another reason we should remove this now is that having this setting turned off is causing a bug to result with
wallet_switchEthereumChainand the interaction between the new chain permissions feature and the absence of queuing.References
Extension PR w/ preview builds of this PR (plus full removal of the toggle): MetaMask/metamask-extension#28577
When integrated in the extension will resolve this issue: MetaMask/metamask-extension#28441
Changelog
@metamask/queued-request-controllercreateQueuedRequestMiddlewareno longer expects auseRequestQueueproperty in its param options.@metamask/selected-network-controlleruseRequestQueuePreferenceoronPreferencesStateChangeparamsChecklist