(
// preferencesState is typed as any because if not will give an ts error on every assets-controllers using this function
// because assets-controllers preferences controller version is misaligned with the app repo (v8 != v4)
// and because of that preferencesState would be two different objects
listener: (preferencesState: PreferencesState) => void,
)
| 384 | * @param listener - The callback function to execute when the state changes. |
| 385 | */ |
| 386 | const onPreferencesStateChange = ( |
| 387 | // preferencesState is typed as any because if not will give an ts error on every assets-controllers using this function |
| 388 | // because assets-controllers preferences controller version is misaligned with the app repo (v8 != v4) |
| 389 | // and because of that preferencesState would be two different objects |
| 390 | listener: (preferencesState: PreferencesState) => void, |
| 391 | ) => { |
| 392 | const eventName = `PreferencesController:stateChange`; |
| 393 | |
| 394 | this.controllerMessenger.subscribe(eventName, listener); |
| 395 | }; |
| 396 | |
| 397 | const approvalController = new ApprovalController({ |
| 398 | // @ts-expect-error TODO: Resolve/patch mismatch between base-controller versions. Before: never, never. Now: string, string, which expects 3rd and 4th args to be informed for restrictedControllerMessengers |
nothing calls this directly
no outgoing calls
no test coverage detected