-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
chore: Remove useRequestQueue
toggle to turn on/off Per Dapp Selected Network Feature
#4941
Conversation
c4089a8
to
3196bc4
Compare
3196bc4
to
fc955bd
Compare
@metamaskbot publish-preview |
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
// 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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
## 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>
## 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>
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
SelectedNetworkController
andQueuedRequestMiddleware
The 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_switchEthereumChain
and 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-controller
createQueuedRequestMiddleware
no longer expects auseRequestQueue
property in its param options.@metamask/selected-network-controller
useRequestQueuePreference
oronPreferencesStateChange
paramsChecklist