metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

feat(identity): enable contact backup-and-sync

Open fabiobozzo opened this issue 5 months ago • 7 comments

Description

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.

Related issues

Depends on: https://github.com/MetaMask/core/pull/5776 Relates to: https://github.com/MetaMask/metamask-extension/pull/32632

Manual testing steps

Happy flow:

  • Setup at least two instances of MetaMask, of which at least one mobile app. Let's assume they're called A and B for next steps.
  • Start fresh with an empty address book (contact syncing is enabled by default)
  • Add a contact Alice on A
  • Unlock B: Alice should be found in the address book
  • On B: edit Alice memo (and-or its name)
  • Lock/Unlock A : find the Alice updates in address book
  • Add another contact Bob on B
  • Lock/unlock A and find Bob in address book
  • Now, delete Alice on A, lock/unlock B and check that Alice is no longer in address book
  • Do the opposite test: delete Bob on B and check for its absence on A

Screenshots/Recordings

Loom Video 👈

Before

image

After

image

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.

fabiobozzo avatar May 28 '25 10:05 fabiobozzo