Skip to content

Commit

Permalink
Define restricted messenger for SmartTransactionsController and pas…
Browse files Browse the repository at this point in the history
…s in as constructor option
  • Loading branch information
MajorLift committed Sep 13, 2024
1 parent 2a51121 commit b9370f3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,12 @@ class Engine {
// @ts-expect-error TODO: resolve types
supportedChainIds: getAllowedSmartTransactionsChainIds(),
state: initialState.SmartTransactionsController,
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
messenger: this.controllerMessenger.getRestricted({
name: 'SmartTransactionsController',
allowedActions: ['NetworkController:getNetworkClientById'],
allowedEvents: ['NetworkController:stateChange'],
}),
});

const controllers: Controllers[keyof Controllers][] = [
Expand Down

0 comments on commit b9370f3

Please sign in to comment.