Skip to content

feat: add extension settings to PreferencesController #6152

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fabiobozzo
Copy link
Contributor

@fabiobozzo fabiobozzo commented Jul 21, 2025

Explanation

This PR adds missing preference properties to the core PreferencesController that currently only exist in the MetaMask Extension's custom implementation. This is a prerequisite for the Extension to migrate from its custom PreferencesController to the core package.

The Extension has accumulated many additional preferences over time that were never added to the core controller. This PR brings the core controller to feature parity by adding:

  • Visual/UI preferences (theme, locale, blockies, etc.)
  • Security/privacy preferences (phishing detection, external services, etc.)
  • Advanced settings (gas fees, hardware wallet config, etc.)
  • Feature flags (Snaps, watch accounts, etc.)
  • User experience preferences (auto-lock, token display, etc.)

No behavioral changes - just expanding the state interface to support all preferences currently used by the Extension.

References

Changelog

@metamask/preferences-controller - BREAKING: Expanded PreferencesState interface with additional properties previously only in Extension

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant