Skip to content

feat: migrate general settings to core PreferencesController #34327

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

Closed
wants to merge 1 commit into from

Conversation

fabiobozzo
Copy link
Contributor

Description

This PR moves general settings from the extension-specific PreferencesController to the shared PreferencesController from core to enable cross-platform syncing in future releases.

Changes:

  • Added CorePreferencesController integration to MetamaskController
  • Created migration 172 to migrate existing general settings (currentLocale, theme, useBlockie, currentCurrency, showNativeTokenAsMainBalance, hideZeroBalanceTokens)
  • Updated store actions to route general settings to core controller
  • Updated selectors to read from core controller with extension fallback
  • Added comprehensive migration tests and TODOs for future cleanup

The change is transparent to users but prepares the foundation for settings sync across extension and mobile.

Changelog

CHANGELOG entry: Prepared general settings for cross-platform sync by moving to shared core controller

Related issues

Depends on: MetaMask/core#6111

Manual testing steps

  1. Install extension and go through onboarding
  2. Navigate to Settings → General
  3. Change language, theme, currency, identicon style, and balance display preferences
  4. Verify all settings save and persist correctly
  5. Check that settings work the same as before (no functional changes)
  6. Verify migration works by checking that existing users retain their settings after upgrade

Screenshots/Recordings

Before

Settings managed by extension PreferencesController only

After

Settings managed by CorePreferencesController with seamless user experience (no visible changes)

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

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​controller-utils@​11.10.0 ⏵ 11.11.09810075 +195100
Updated@​metamask/​preferences-controller@​17.0.0 ⏵ 18.4.1-preview-32f9004a100 +2100100 +28100 +3100

View full report

@fabiobozzo fabiobozzo closed this Jul 18, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants