Skip to content

Commit

Permalink
Consolidate comments on ComposableController events allowlist
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Jul 29, 2024
1 parent 1d28370 commit b141caf
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1484,10 +1484,8 @@ class Engine {
messenger: this.controllerMessenger.getRestricted({
name: 'ComposableController',
allowedActions: [],
// Exclude non-controllers with empty state and V1 controllers with no messagingSystem.
allowedEvents: [
/**
* V1/V2 controllers with correctly defined messengers and `stateChange` events.
*/
'AccountsController:stateChange',
'AccountTrackerController:stateChange',
'AddressBookController:stateChange',
Expand All @@ -1505,29 +1503,17 @@ class Engine {
'PPOMController:stateChange',
'PreferencesController:stateChange',
'SignatureController:stateChange',
// 'SmartTransactionsController:stateChange', // TODO: uncomment once controller is migrated to V2.
'SnapController:stateChange',
'SnapsRegistry:stateChange',
'SubjectMetadataController:stateChange',
// 'SwapsController:stateChange', // TODO: uncomment once controller is migrated to V2.
'TokenBalancesController:stateChange',
'TokenRatesController:stateChange',
'TokenListController:stateChange',
'TokensController:stateChange',
'TransactionController:stateChange',
'UserStorageController:stateChange',

/**
* V1 controllers that should be excluded from the datamodel's events allowlist for now.
* TODO: Each of these events should be added to the allowlist once its controller is migrated to V2.
*/
// 'SmartTransactionsController:stateChange', // StaticIntervalPollingControllerV1, no `messagingSystem`
// 'SwapsController:stateChange', // BaseControllerV1, no `messagingSystem`

/**
* Non-controllers that should always be excluded from the datamodel's events allowlist.
*/
// 'AssetsContractController:stateChange', // BaseControllerV1, no `messagingSystem`
// 'NftDetectionController:stateChange', // StaticIntervalPollingControllerV1, no `messagingSystem`
// 'TokenDetectionController:stateChange', // StaticIntervalPollingController, empty state
],
}),
});
Expand Down

0 comments on commit b141caf

Please sign in to comment.