From a03c277757faacd092424ff3e8723daaf4d1a5c3 Mon Sep 17 00:00:00 2001 From: mikesposito Date: Wed, 22 Jul 2026 14:08:22 +0200 Subject: [PATCH] feat!: add `ConfigRegistryControllerStateChanged` event --- packages/config-registry-controller/CHANGELOG.md | 8 ++++++++ .../src/ConfigRegistryController.ts | 8 ++++---- packages/config-registry-controller/src/index.ts | 1 - 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/config-registry-controller/CHANGELOG.md b/packages/config-registry-controller/CHANGELOG.md index d95aff9dcd0..be0b7904c2e 100644 --- a/packages/config-registry-controller/CHANGELOG.md +++ b/packages/config-registry-controller/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add `ConfigRegistryControllerStateChangedEvent` (`ConfigRegistryController:stateChanged`) to the controller's events ([#9595](https://github.com/MetaMask/core/pull/9595)) + ### Changed - Bump `@metamask/utils` from `^11.9.0` to `^11.11.0` ([#9074](https://github.com/MetaMask/core/pull/9074)) @@ -16,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump `@metamask/polling-controller` from `^16.0.6` to `^16.0.8` ([#9218](https://github.com/MetaMask/core/pull/9218), [#9349](https://github.com/MetaMask/core/pull/9349)) - Bump `@metamask/messenger` from `^1.2.0` to `^2.0.0` ([#9392](https://github.com/MetaMask/core/pull/9392)) +### Removed + +- **BREAKING:** Removed `ConfigRegistryControllerStateChangeEvent` type in favor of `ConfigRegistryControllerStateChangedEvent` ([#9595](https://github.com/MetaMask/core/pull/9595)) + ## [0.4.1] ### Changed diff --git a/packages/config-registry-controller/src/ConfigRegistryController.ts b/packages/config-registry-controller/src/ConfigRegistryController.ts index 2d5e5ec2f56..01c02a0f13c 100644 --- a/packages/config-registry-controller/src/ConfigRegistryController.ts +++ b/packages/config-registry-controller/src/ConfigRegistryController.ts @@ -1,6 +1,6 @@ import type { ControllerGetStateAction, - ControllerStateChangeEvent, + ControllerStateChangedEvent, StateMetadata, } from '@metamask/base-controller'; import type { @@ -99,8 +99,8 @@ const MESSENGER_EXPOSED_METHODS = ['startPolling', 'stopPolling'] as const; /** * Published when the state of {@link ConfigRegistryController} changes. */ -export type ConfigRegistryControllerStateChangeEvent = - ControllerStateChangeEvent< +export type ConfigRegistryControllerStateChangedEvent = + ControllerStateChangedEvent< typeof controllerName, ConfigRegistryControllerState >; @@ -133,7 +133,7 @@ type AllowedActions = * Events that {@link ConfigRegistryControllerMessenger} exposes to other consumers. */ export type ConfigRegistryControllerEvents = - ConfigRegistryControllerStateChangeEvent; + ConfigRegistryControllerStateChangedEvent; /** * Events from other messengers that {@link ConfigRegistryControllerMessenger} diff --git a/packages/config-registry-controller/src/index.ts b/packages/config-registry-controller/src/index.ts index bcc085962d1..2d1e87d3662 100644 --- a/packages/config-registry-controller/src/index.ts +++ b/packages/config-registry-controller/src/index.ts @@ -4,7 +4,6 @@ export type { ConfigRegistryControllerActions, ConfigRegistryControllerGetStateAction, ConfigRegistryControllerEvents, - ConfigRegistryControllerStateChangeEvent, ConfigRegistryControllerMessenger, } from './ConfigRegistryController.js'; export type {