Skip to content

Commit

Permalink
feat: Let addresses regeneration happen before sync task starts
Browse files Browse the repository at this point in the history
  • Loading branch information
ashchan committed Nov 14, 2019
1 parent e8ac6fb commit a52a531
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/neuron-wallet/src/controllers/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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')
}
Expand Down
2 changes: 2 additions & 0 deletions packages/neuron-wallet/src/main.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -9,6 +10,7 @@ const appController = new AppController()
app.on('ready', async () => {
changeLanguage(app.getLocale())

WalletService.getInstance().generateAddressesIfNecessary()
createSyncBlockTask()

appController.openWindow()
Expand Down

0 comments on commit a52a531

Please sign in to comment.