diff --git a/packages/accounts-controller/src/AccountsController.test.ts b/packages/accounts-controller/src/AccountsController.test.ts index b28666d152..4afab752bf 100644 --- a/packages/accounts-controller/src/AccountsController.test.ts +++ b/packages/accounts-controller/src/AccountsController.test.ts @@ -1,4 +1,4 @@ -import { ControllerMessenger } from '@metamask/base-controller'; +import { Messenger } from '@metamask/base-controller'; import { BtcAccountType, EthAccountType, @@ -267,12 +267,12 @@ function setLastSelectedAsAny(account: InternalAccount): InternalAccount { } /** - * Builds a new instance of the ControllerMessenger class for the AccountsController. + * Builds a new instance of the Messenger class for the AccountsController. * - * @returns A new instance of the ControllerMessenger class for the AccountsController. + * @returns A new instance of the Messenger class for the AccountsController. */ function buildMessenger() { - return new ControllerMessenger< + return new Messenger< AccountsControllerActions | AllowedActions, AccountsControllerEvents | AllowedEvents >(); @@ -312,13 +312,13 @@ function setupAccountsController({ messenger = buildMessenger(), }: { initialState?: Partial; - messenger?: ControllerMessenger< + messenger?: Messenger< AccountsControllerActions | AllowedActions, AccountsControllerEvents | AllowedEvents >; }): { accountsController: AccountsController; - messenger: ControllerMessenger< + messenger: Messenger< AccountsControllerActions | AllowedActions, AccountsControllerEvents | AllowedEvents >; diff --git a/packages/accounts-controller/src/AccountsController.ts b/packages/accounts-controller/src/AccountsController.ts index f2feed0e07..f7ce14e9a3 100644 --- a/packages/accounts-controller/src/AccountsController.ts +++ b/packages/accounts-controller/src/AccountsController.ts @@ -1,7 +1,7 @@ import type { ControllerGetStateAction, ControllerStateChangeEvent, - RestrictedControllerMessenger, + RestrictedMessenger, } from '@metamask/base-controller'; import { BaseController } from '@metamask/base-controller'; import { SnapKeyring } from '@metamask/eth-snap-keyring'; @@ -171,7 +171,7 @@ export type AccountsControllerEvents = | AccountsControllerAccountRemovedEvent | AccountsControllerAccountRenamedEvent; -export type AccountsControllerMessenger = RestrictedControllerMessenger< +export type AccountsControllerMessenger = RestrictedMessenger< typeof controllerName, AccountsControllerActions | AllowedActions, AccountsControllerEvents | AllowedEvents,