-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
fix: SelectedNetworkController
permission state change handler
#4368
Merged
adonesky1
merged 5 commits into
main
from
jl/fix-selected-network-controller-permission-state-change-handler
Jun 5, 2024
Merged
fix: SelectedNetworkController
permission state change handler
#4368
adonesky1
merged 5 commits into
main
from
jl/fix-selected-network-controller-permission-state-change-handler
Jun 5, 2024
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
Gudahtt
previously approved these changes
Jun 5, 2024
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.
LGTM!
…n-state-change-handler
adonesky1
reviewed
Jun 5, 2024
packages/selected-network-controller/tests/SelectedNetworkController.test.ts
Outdated
Show resolved
Hide resolved
…roller.test.ts Co-authored-by: Alex Donesky <[email protected]>
adonesky1
approved these changes
Jun 5, 2024
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.
LGTM
…n-state-change-handler
danjm
pushed a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jun 5, 2024
…25046) Hotfix for v11.6.6 that patches @metamask/selected-network-controller 12.0.1 to include a check for if the useRequestQueue flag is set before setting the networkClientId for a domain on permission controller state change additions * Core PR: MetaMask/core#4368 * Core patch branch: https://github.com/MetaMask/core/tree/jl/patch-selected-network-controller-12.0.1-permission-state-change-guard --------- Co-authored-by: Mark Stacey <[email protected]>
adonesky1
deleted the
jl/fix-selected-network-controller-permission-state-change-handler
branch
June 5, 2024 15:36
7 tasks
3 tasks
jiexi
added a commit
that referenced
this pull request
Jun 10, 2024
…uePreference guard (#4388) ## Explanation Our previous SelectedNetworkController fix that [added a guard to permission state changes](#4368) was not sufficient. This PR properly addresses the underlying issue of setting networkClientId for domains when the `useRequestQueuePreference` flag is false by moving the guard into the `setNetworkClientId()` method itself ## References * Fixes: MetaMask/metamask-extension#25097 ## 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/selected-network-controller` - **FIXED**: `setNetworkClientId()` will now result in a noop if `useRequestQueuePreference` is false ## 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 - [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate --------- Co-authored-by: Alex Donesky <[email protected]>
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
Fixes a bug with
SelectedNetworkController
where it incorrectly sets the networkClientId for a newly permitted domain when the useRequestQueue flag is set to false.References
See: MetaMask/metamask-extension#25046
Changelog
@metamask/selected-network-controller
useRequestQueuePreference
flag is trueChecklist