Skip to content
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: Cherry-pick persistence fix to RC #26305

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Aug 2, 2024

Description

Cherry-picks fcf474c to the RC.

Description from the original PR:

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

…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)
@FrederikBolding FrederikBolding requested a review from a team as a code owner August 2, 2024 11:30
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Aug 2, 2024
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@FrederikBolding FrederikBolding merged commit 8263f93 into Version-v12.0.1 Aug 2, 2024
75 of 76 checks passed
@FrederikBolding FrederikBolding deleted the fb/persistence-rc-hotfix branch August 2, 2024 12:05
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [b1d9f79]
Page Load Metrics (126 ± 161 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint69988184
domContentLoaded9121010
load431583126334161
domInteractive9121010

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template team-extension-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants