Skip to content

feat(identity): sync address book contacts #5776

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 23 commits into
base: main
Choose a base branch
from

Conversation

fabiobozzo
Copy link

@fabiobozzo fabiobozzo commented May 7, 2025

Explanation

The current implementation of MetaMask's address book (contacts) lacks the ability to synchronize between devices. While we recently implemented this capability for accounts using encrypted user storage, the address book remained local to each device.
This PR implements backup-and-sync functionality for the address book controller, similar to what was already implemented for the accounts controller.

Implementation notes

  1. Creates a dedicated integration in the profile-sync-controller package with:
  • Type definitions for address book storage entries
  • Conversion utilities between controller and storage formats
  • Sync logic to handle bidirectional synchronization
  1. Event subscriptions to trigger syncs on contact changes
  2. Updates the UserStorageController to properly handle address book data

References

Needed by: MetaMask/metamask-extension#32632
Depends on: #5779

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

Copy link

socket-security bot commented May 19, 2025

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

@fabiobozzo fabiobozzo changed the title feat(identity): sync address book feat(identity): sync address book contacts May 22, 2025
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.

2 participants