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: account syncing was not working after upgrading from a previous version #29701

Merged
merged 5 commits into from
Jan 15, 2025

Conversation

mathieuartu
Copy link
Contributor

@mathieuartu mathieuartu commented Jan 14, 2025

Description

Account syncing was depending on _addAccountsWithBalance to be finished before being triggered.
But _addAccountsWithBalance was only triggered after onboarding.

So people upgrading from a previous version of the extension were not able to use account syncing since _addAccountsWithBalance was triggered during their original onboarding, at a time where account syncing was not available.

Additionally, the state value isAccountSyncingReadyToBeDispatched from UserStorageController was not persisted. So people were not able to use account syncing after upgrading their extension version, even coming from a version that had account syncing enabled and working.

This PR fixes that, by adding a migration that sets isAccountSyncingReadyToBeDispatched to true if completedOnboarding is true.

Also, bumping @metamask/profile-sync-controller to version v4.1.0 will ensure that isAccountSyncingReadyToBeDispatched is persisted. (MetaMask/core#5147)

Open in GitHub Codespaces

Related issues

Fixes: #29679

Manual testing steps

  1. Install MetaMask v12.9.3
  2. Complete onboarding
  3. Upgrade to this PR version
  4. Verify that account syncing is working

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

Copy link

socket-security bot commented Jan 14, 2025

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/profile-sync-controller@4.1.0 🔁 npm/@metamask/profile-sync-controller@4.0.1 None 0 1.49 MB metamaskbot

View full report↗︎

Copy link

socket-security bot commented Jan 14, 2025

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@metamaskbot
Copy link
Collaborator

Builds ready [ec946ad]
Page Load Metrics (1766 ± 87 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint40719981599413198
domContentLoaded15142143173718388
load15392150176618187
domInteractive2795472210
backgroundConnect10139343014
firstReactRender1798662914
getState567182110
initialActions01000
loadScripts11171573129914670
setupStore67411147
uiStartup171725792165259124
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.39 KiB (0.02%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@mathieuartu mathieuartu changed the title feat: persist isAccountSyncingReadyToBeDispatched fix: account syncing after upgrading from a previous version Jan 14, 2025
@mathieuartu mathieuartu changed the title fix: account syncing after upgrading from a previous version fix: account syncing was not working after upgrading from a previous version Jan 14, 2025
@mathieuartu mathieuartu marked this pull request as ready for review January 14, 2025 18:30
@metamaskbot
Copy link
Collaborator

Builds ready [4728285]
Page Load Metrics (1855 ± 130 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint46927041782405195
domContentLoaded148226171826266128
load150627071855271130
domInteractive27201584522
backgroundConnect586272211
firstReactRender18104492713
getState693182311
initialActions01000
loadScripts104719741383226109
setupStore66616189
uiStartup178532982123333160
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.39 KiB (0.02%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@cmd-ob cmd-ob added this pull request to the merge queue Jan 15, 2025
Merged via the queue into main with commit d8ce2c7 Jan 15, 2025
80 checks passed
@cmd-ob cmd-ob deleted the fix/persist-account-sync-state-value branch January 15, 2025 06:48
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2025
@metamaskbot metamaskbot added the release-12.11.0 Issue or pull request that will be included in release 12.11.0 label Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.11.0 Issue or pull request that will be included in release 12.11.0 team-identity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update metamask/profile-sync-controller to version 4.0.0
4 participants