feat(profile-sync-controller): add clearState to AuthenticationController - #10165
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 14c076e. Configure here.
…n/AuthenticationController.test.ts Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
ccharly
approved these changes
Sep 10, 2026
mathieuartu
enabled auto-merge
September 10, 2026 12:29
pull Bot
pushed a commit
to Reality2byte/core
that referenced
this pull request
Sep 10, 2026
## Explanation Publishes `@metamask/profile-sync-controller@32.0.0` and `@metamask/ramps-controller@22.0.0` so clients can pick up V2 ramps order syncing via User Storage (MetaMask#9474). - **profile-sync-controller 32.0.0:** adds `BACKUPANDSYNC_FEATURES.rampsSyncing`, `isRampsSyncingEnabled`, and `AuthenticationController.clearState()` (MetaMask#10165). **BREAKING:** `UserStorageControllerState` requires `isRampsSyncingEnabled`. - **ramps-controller 22.0.0:** adds V2 order sync (`RampsController:syncOrdersWithUserStorage`). **BREAKING:** messenger must delegate User Storage actions and `AuthenticationController:isSignedIn`. Also publishes dependent packages so clients can adopt the new majors without retaining duplicate dependency versions: - **Minor:** `@metamask/profile-metrics-controller@5.1.0`, `@metamask/bridge-controller@81.1.0`, `@metamask/bridge-status-controller@76.1.0` - **Patch:** `@metamask/account-tree-controller@10.0.1`, `@metamask/assets-controllers@112.0.1`, `@metamask/claims-controller@1.0.1`, `@metamask/core-backend@10.0.1`, `@metamask/notification-services-controller@28.0.1`, `@metamask/shield-controller@7.0.1`, `@metamask/smart-transactions-controller@27.0.1`, `@metamask/social-controllers@3.0.1`, `@metamask/subscription-controller@9.0.1`, and `@metamask/transaction-pay-controller@28.0.1`. ## References * Related to MetaMask#9474 * Follows 1247.0.0 after tags were restored: https://github.com/MetaMask/core/releases/tag/v1247.0.0 ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [x] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > No new runtime code in this diff, but it publishes major/breaking controller releases and wide dependency realignment—client integrators must adopt new state shapes and messenger wiring when bumping. > > **Overview** > **Monorepo release 1248.0.0** — bumps the root version and cuts new package versions with updated `CHANGELOG.md` entries, `package.json` dependency ranges, and `yarn.lock`. > > The release ships **`@metamask/profile-sync-controller@32.0.0`** and **`@metamask/ramps-controller@22.0.0`** (features already landed in prior PRs; this PR only publishes them). Dependent packages are republished mostly as **patch** bumps that raise `@metamask/profile-sync-controller` to **`^32.0.0`** (and related bumps such as `@metamask/account-tree-controller@10.0.1`, `@metamask/assets-controllers@112.0.1`, `@metamask/core-backend@10.0.1`). **`@metamask/profile-metrics-controller@5.1.0`**, **`@metamask/bridge-controller@81.1.0`**, and **`@metamask/bridge-status-controller@76.1.0`** are included as minor releases in the same train. **`@metamask/transaction-pay-controller@28.0.1`** also picks up **`@metamask/ramps-controller@^22.0.0`**. > > Consumers upgrading to this release inherit the **documented breaking changes** from profile-sync **32** (`UserStorageControllerState.isRampsSyncingEnabled`) and ramps **22** (extra messenger delegations for User Storage sync), plus wallet-reset support via **`AuthenticationController.clearState()`** in the published profile-sync version. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 2ff3eb7. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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
References
Related to: https://consensyssoftware.atlassian.net/browse/MUL-2240
Checklist
Note
Medium Risk
Touches authentication lifecycle on wallet reset (session wipe and re-arming pairing gates); incorrect client wiring could leave stale auth state or skip required pairing on the next wallet.
Overview
Adds
AuthenticationController.clearState()(andAuthenticationController:clearState) so hosts can wipe auth state on wallet reset, not just on sign-out.clearStatereplaces persisted state withdefaultState: signed out, nosrpSessionData, and bothneedsProfilePairing/needsSocialPairingset back totrue.performSignOutis unchanged in behavior; new tests document that sign-out still leaves pairing gates cleared, unlike a full reset.clearStatealso bumps#profilePairingRequestEpoch(same mechanism asrequestProfilePairing) so an in-flightperformSignIncannot clearneedsProfilePairingafter a reset mid-/pair. Test helpers gain optional delayed/pairmocks to cover that race.Changelog and exported
AuthenticationControllerClearStateActionare updated; consumers must allow the new messenger action if they call it through the registry.Reviewed by Cursor Bugbot for commit c2ed73f. Bugbot is set up for automated code reviews on this repo. Configure here.