diff --git a/packages/neuron-wallet/src/controllers/app/index.ts b/packages/neuron-wallet/src/controllers/app/index.ts index 6a0ed85bd5..e5e404d159 100644 --- a/packages/neuron-wallet/src/controllers/app/index.ts +++ b/packages/neuron-wallet/src/controllers/app/index.ts @@ -6,7 +6,6 @@ import env from 'env' import { updateApplicationMenu } from './menu' import logger from 'utils/logger' import { subscribe } from './subscribe' -import WalletService from 'services/wallets' const app = electronApp || (remote && remote.app) @@ -66,8 +65,6 @@ export default class AppController { this.mainWindow.show() this.mainWindow.focus() logger.info('The main window is ready to show') - - WalletService.getInstance().generateAddressesIfNecessary() } else { logger.error('The main window is not initialized on ready to show') } diff --git a/packages/neuron-wallet/src/main.ts b/packages/neuron-wallet/src/main.ts index bb62cfe71e..257b253887 100644 --- a/packages/neuron-wallet/src/main.ts +++ b/packages/neuron-wallet/src/main.ts @@ -1,6 +1,7 @@ import { app } from 'electron' import AppController from 'controllers/app' +import WalletService from 'services/wallets' import createSyncBlockTask from 'startup/sync-block-task/create' import { changeLanguage } from 'utils/i18n' @@ -9,6 +10,7 @@ const appController = new AppController() app.on('ready', async () => { changeLanguage(app.getLocale()) + WalletService.getInstance().generateAddressesIfNecessary() createSyncBlockTask() appController.openWindow()