Open
Conversation
4d04889 to
3ec2a74
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. |
3ec2a74 to
02071b5
Compare
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
mcmire
reviewed
Mar 26, 2026
mcmire
reviewed
Mar 31, 2026
Contributor
mcmire
left a comment
There was a problem hiding this comment.
One more thing and then I can approve.
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 ConnectivityController currently defines selectors for accessing its state directly in clients, making it inconsistent with our guidelines.
Solution:
selectConnectivityStatus- simple selector that returns the current connectivity statusselectIsOffline- memoized selector usingreselectthat returnstruewhen offlineThe selectors are exported from the package and can be used with Redux or directly with controller state.
References
Checklist
Note
Low Risk
Low risk: adds new exported selectors and a
reselectdependency without changing controller behavior or state shape.Overview
Adds a new exported
connectivityControllerSelectorsAPI withselectConnectivityStatusand a memoizedselectIsOffline(viareselect) for readingConnectivityControllerState.Updates
@metamask/connectivity-controllerto depend onreselect, adds unit tests for the selectors, and documents the addition in the package changelog.Written by Cursor Bugbot for commit d10a1ef. This will update automatically on new commits. Configure here.