Skip to content

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Aug 21, 2025

Explanation

Add the includeInStateLogs and usedInUi state metadata properties. This is the implementation of the second option of this ADR: https://github.com/MetaMask/decisions/pull/101

The deriveStateFromMetadata function has also been exported, rather than adding two new exports for these new properties. The previous exported state derivation functions (getPersistedState and getAnonymizedState) have been deprecated in favour of deriveStateFromMetadata.

References

Related to https://github.com/MetaMask/decisions/pull/101

Fixes #6443

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

@Gudahtt Gudahtt force-pushed the add-additional-controller-metadata branch 2 times, most recently from afdce57 to f5cd542 Compare August 25, 2025 21:57
@Gudahtt Gudahtt force-pushed the add-additional-controller-metadata branch from f5cd542 to 10820ba Compare September 2, 2025 16:01
@Gudahtt Gudahtt force-pushed the add-additional-controller-metadata branch from 06c0400 to b99bd0b Compare September 2, 2025 16:37
@Gudahtt Gudahtt marked this pull request as ready for review September 2, 2025 16:37
@Gudahtt Gudahtt requested a review from a team as a code owner September 2, 2025 16:37
cursor[bot]

This comment was marked as outdated.

@Gudahtt Gudahtt force-pushed the add-additional-controller-metadata branch from 7cb3f4f to a09aedf Compare September 3, 2025 16:53
cursor[bot]

This comment was marked as outdated.

@Gudahtt Gudahtt force-pushed the add-additional-controller-metadata branch 3 times, most recently from c254f4b to 4092ff4 Compare September 3, 2025 17:44
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

Gudahtt and others added 10 commits September 3, 2025 16:22
Add the `includeInStateLogs` and `usedInUi` state metadata properties,
and rename `anonymous` to `includeInDebugSnapshot`. This is the
implementation of the second option of this ADR: MetaMask/decisions#101

Related to MetaMask/decisions#101
Fixes #643
…ed metadata instead as a way to disallow deriver for usedInUi
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
@Gudahtt Gudahtt force-pushed the add-additional-controller-metadata branch from 0dcdc73 to 50859de Compare September 3, 2025 18:52
@Gudahtt Gudahtt enabled auto-merge (squash) September 3, 2025 18:52
@Gudahtt Gudahtt merged commit 586c181 into main Sep 3, 2025
239 checks passed
@Gudahtt Gudahtt deleted the add-additional-controller-metadata branch September 3, 2025 18:58
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.

Add new includeInStateLogs and usedInUi controller metadata properties
3 participants