From 31f5c116c5a11da4ea127d0b1accb3fa37b2e59b Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Fri, 24 Oct 2025 17:00:16 -0230 Subject: [PATCH] fix: Fix mistake in `StatePropertyMetadataConstraint` type In the `next` export of `base-controller`, the type `StatePropertyMetadataConstraint` mistakenly referenced the old metadata property name `anonymous` rather than `includeInDebugSnapshot`. The type has been updated to use the correct name. --- packages/base-controller/CHANGELOG.md | 5 +++++ packages/base-controller/src/next/BaseController.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/base-controller/CHANGELOG.md b/packages/base-controller/CHANGELOG.md index 7730178365f..fc4a02ca687 100644 --- a/packages/base-controller/CHANGELOG.md +++ b/packages/base-controller/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- In experimental `next` export, fix the `StatePropertyMetadataConstraint` type ([#6942](https://github.com/MetaMask/core/pull/6942)) + - It incorrectly used the old metadata property `anonymous` instead of `includeInDebugSnapshot` + ## [8.4.2] ### Fixed diff --git a/packages/base-controller/src/next/BaseController.ts b/packages/base-controller/src/next/BaseController.ts index cf4dafe793c..7d2c0059ae2 100644 --- a/packages/base-controller/src/next/BaseController.ts +++ b/packages/base-controller/src/next/BaseController.ts @@ -112,7 +112,7 @@ export type StateDeriverConstraint = (value: never) => Json; * This type can be assigned to any `StatePropertyMetadata` type. */ export type StatePropertyMetadataConstraint = { - anonymous: boolean | StateDeriverConstraint; + includeInDebugSnapshot: boolean | StateDeriverConstraint; includeInStateLogs?: boolean | StateDeriverConstraint; persist: boolean | StateDeriverConstraint; usedInUi?: boolean;