Skip to content

Commit

Permalink
Add SmartTransactions{Actions,Events} to Global{Actions,Events} a…
Browse files Browse the repository at this point in the history
…nd uncomment `stateChange` event in datamodel allowlist
  • Loading branch information
MajorLift committed Sep 12, 2024
1 parent 835000b commit e86ae9d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -1569,6 +1569,7 @@ class Engine {
'PermissionController:stateChange',
'PreferencesController:stateChange',
'SignatureController:stateChange',
'SmartTransactionsController:stateChange',
'SnapController:stateChange',
'SubjectMetadataController:stateChange',
'TokenBalancesController:stateChange',
Expand Down Expand Up @@ -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`.
Expand Down

0 comments on commit e86ae9d

Please sign in to comment.