Skip to content

Commit 53b9476

Browse files
committed
feat: inject account service to ipc controller
1 parent 16adb62 commit 53b9476

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

electron/main/app.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ import { BrowserWindow, app, shell } from 'electron';
33
import path from 'node:path';
44
import serve from 'electron-serve';
55
import { runInBackground } from '../common/async';
6+
import { AccountServiceImpl } from './account';
67
import { IpcController } from './ipc';
78
import { createLogger } from './logger';
89
import { initializeMenu } from './menu';
10+
import { Store } from './store';
911
import type { Dispatcher } from './types';
1012

1113
app.setName('Phoenix');
@@ -91,7 +93,14 @@ const createWindow = async (): Promise<void> => {
9193
mainWindow.webContents.send(channel, ...args);
9294
};
9395

94-
new IpcController({ dispatch }).registerHandlers();
96+
const ipcController = new IpcController({
97+
dispatch,
98+
accountService: new AccountServiceImpl({
99+
storeService: Store.getInstance(),
100+
}),
101+
});
102+
103+
ipcController.registerHandlers();
95104

96105
await mainWindow.loadURL(appUrl);
97106

0 commit comments

Comments
 (0)