diff --git a/app/core/Engine.ts b/app/core/Engine.ts index 088da5cc16e7..55dea692595b 100644 --- a/app/core/Engine.ts +++ b/app/core/Engine.ts @@ -214,6 +214,8 @@ import { networkIdWillUpdate, } from '../core/redux/slices/inpageProvider'; import SmartTransactionsController, { + type SmartTransactionsControllerActions, + type SmartTransactionsControllerEvents, type SmartTransactionsControllerState, } from '@metamask/smart-transactions-controller'; import { getAllowedSmartTransactionsChainIds } from '../../app/constants/smartTransactions'; @@ -284,8 +286,7 @@ type GlobalActions = // | AddressBookControllerActions // TODO: uncomment once `NftController` is upgraded to V2 // | NftControllerActions - // TODO: uncomment once `SmartTransactionController` is upgraded to V2 - // | SmartTransactionControllerActions + | SmartTransactionsControllerActions // TODO: uncomment once `SwapsController` is upgraded to V2 // | SwapsControllerActions | ApprovalControllerActions @@ -318,8 +319,7 @@ type GlobalEvents = // | AddressBookControllerEvents // TODO: uncomment once `NftController` is upgraded to V2 // | NftControllerEvents - // TODO: uncomment once `SmartTransactionController` is upgraded to V2 - // | SmartTransactionControllerEvents + | SmartTransactionsControllerEvents // TODO: uncomment once `SwapsController` is upgraded to V2 // | SwapsControllerEvents // TODO: uncomment once `Events` type is added to `AuthenticationController` @@ -1569,6 +1569,7 @@ class Engine { 'PermissionController:stateChange', 'PreferencesController:stateChange', 'SignatureController:stateChange', + 'SmartTransactionsController:stateChange', 'SnapController:stateChange', 'SubjectMetadataController:stateChange', 'TokenBalancesController:stateChange', @@ -1609,8 +1610,6 @@ class Engine { // 'AccountTrackerController:stateChange', // StaticIntervalPollingControllerV1, no `messagingSystem` // TODO: uncomment once `AddressBookController` is migrated to V2 and the `stateChange` event is added to its `messagingSystem`. // 'AddressBookController:stateChange', // BaseControllerV1, no `messagingSystem` - // TODO: uncomment once `SmartTransactionsController` is migrated to V2 and the `stateChange` event is added to its `messagingSystem`. - // 'SmartTransactionsController:stateChange', // StaticIntervalPollingControllerV1, no `messagingSystem` // TODO: uncomment once `SwapsController` is migrated to V2 and the `stateChange` event is added to its `messagingSystem`. // 'SwapsController:stateChange', // BaseControllerV1, no `messagingSystem` // TODO: uncomment once `TokenRatesController` is migrated to V2 and the `stateChange` event is added to its `messagingSystem`.