|
|
|
@ -49,6 +49,7 @@ import { |
|
|
|
|
import SmartTransactionsController from '@metamask/smart-transactions-controller'; |
|
|
|
|
///: BEGIN:ONLY_INCLUDE_IN(flask)
|
|
|
|
|
import { |
|
|
|
|
CronjobController, |
|
|
|
|
SnapController, |
|
|
|
|
IframeExecutionService, |
|
|
|
|
} from '@metamask/snap-controllers'; |
|
|
|
@ -753,6 +754,24 @@ export default class MetamaskController extends EventEmitter { |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
// --- Snaps Cronjob Controller configuration
|
|
|
|
|
const cronjobControllerMessenger = this.controllerMessenger.getRestricted({ |
|
|
|
|
name: 'CronjobController', |
|
|
|
|
allowedEvents: [ |
|
|
|
|
'SnapController:snapInstalled', |
|
|
|
|
'SnapController:snapUpdated', |
|
|
|
|
'SnapController:snapRemoved', |
|
|
|
|
], |
|
|
|
|
allowedActions: [ |
|
|
|
|
`${this.permissionController.name}:getPermissions`, |
|
|
|
|
'SnapController:handleRequest', |
|
|
|
|
'SnapController:getAll', |
|
|
|
|
], |
|
|
|
|
}); |
|
|
|
|
this.cronjobController = new CronjobController({ |
|
|
|
|
state: initState.CronjobController, |
|
|
|
|
messenger: cronjobControllerMessenger, |
|
|
|
|
}); |
|
|
|
|
///: END:ONLY_INCLUDE_IN
|
|
|
|
|
this.detectTokensController = new DetectTokensController({ |
|
|
|
|
preferences: this.preferencesController, |
|
|
|
@ -1042,6 +1061,7 @@ export default class MetamaskController extends EventEmitter { |
|
|
|
|
CollectiblesController: this.collectiblesController, |
|
|
|
|
///: BEGIN:ONLY_INCLUDE_IN(flask)
|
|
|
|
|
SnapController: this.snapController, |
|
|
|
|
CronjobController: this.cronjobController, |
|
|
|
|
NotificationController: this.notificationController, |
|
|
|
|
///: END:ONLY_INCLUDE_IN
|
|
|
|
|
}); |
|
|
|
@ -1083,6 +1103,7 @@ export default class MetamaskController extends EventEmitter { |
|
|
|
|
CollectiblesController: this.collectiblesController, |
|
|
|
|
///: BEGIN:ONLY_INCLUDE_IN(flask)
|
|
|
|
|
SnapController: this.snapController, |
|
|
|
|
CronjobController: this.cronjobController, |
|
|
|
|
NotificationController: this.notificationController, |
|
|
|
|
///: END:ONLY_INCLUDE_IN
|
|
|
|
|
}, |
|
|
|
|