Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

feat: add optional nameLastUpdatedAt metadata field#366

Merged
mathieuartu merged 1 commit intomainfrom
feat/add_metadata_field_namelastupdatedat
Aug 1, 2024
Merged

feat: add optional nameLastUpdatedAt metadata field#366
mathieuartu merged 1 commit intomainfrom
feat/add_metadata_field_namelastupdatedat

Conversation

@mathieuartu
Copy link
Contributor

@mathieuartu mathieuartu commented Aug 1, 2024

This PR adds a new optional field to InternalAccount metadata, nameLastUpdatedAt.
This field will be crucial in the implementation of the new Account syncing feature (from @MetaMask/notifications ).

It will be used to store a timestamp so we can compare which manual name update is more recent, and then overwrite the account name accordingly when syncing accounts between devices.

Examples

This will be used by the AccountsController method setAccountName to set the timestamp of a manual name update.

This will also be used by UserStorageController when syncing accounts, in order to determine which name is the most recent, and thus the source of truth.

FigJam for Account Syncing

@mathieuartu mathieuartu changed the title feat: add nameLastUpdatedAt metadata field feat: add optional nameLastUpdatedAt metadata field Aug 1, 2024
@mathieuartu mathieuartu marked this pull request as ready for review August 1, 2024 08:24
@mathieuartu mathieuartu requested a review from a team as a code owner August 1, 2024 08:24
@mathieuartu mathieuartu added this pull request to the merge queue Aug 1, 2024
Merged via the queue into main with commit 8ff97de Aug 1, 2024
@mathieuartu mathieuartu deleted the feat/add_metadata_field_namelastupdatedat branch August 1, 2024 09:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants