-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Account for persistence flag when setting initial state in `Comp…
…osableObservableStore` (#26280) ## **Description** Fixes a bug where `ComposableObservableStore` would allow non-persistent state properties in its `initialState`. This in turn would cause state properties flagged as non-persistent to be persisted until a controller state change. This PR addresses this by taking the `persist` flag into account when deriving the initial state for each controller. If the controller does not support `metadata` or persistence is disabled, everything should continue to work as-is. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26280?quickstart=1)
- Loading branch information
1 parent
3f09c80
commit fcf474c
Showing
2 changed files
with
43 additions
and
6 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