-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NetworkController Redux selectors
When running tests, we are seeing the following warning: > An input selector returned a different result when passed same > arguments. This means your output selector will likely run more > frequently than intended. This is happening because the "input selector" in `selectAvailableNetworkClientIds` returns a new object reference (returned by `getNetworkConfigurations`) each time it is called. This violates the Redux guidelines outlined here: <https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization>. To fix this, we split off the "input selector" into its own selector function which we then memoize.
- Loading branch information
Showing
4 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
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