Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/neuron-wallet/src/services/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ class NodeService {
await stopMonitor('ckb')
const isDefaultCKBNeedStart = await this.isDefaultCKBNeedRestart()
if (isDefaultCKBNeedStart) {
if (SettingsService.getInstance().isFirstSync) {
const currentNetwork = NetworksService.getInstance().getCurrent()
if (SettingsService.getInstance().isFirstSync && currentNetwork.type === NetworkType.Default) {
logger.info("CKB:\tThis is the first sync, please wait for the user's confirmation")
return
}
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-wallet/tests/services/node.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ describe('NodeService', () => {
describe('test start default node', () => {
beforeEach(() => {
const NodeService = require('../../src/services/node').default
stubbedNetworsServiceGet.mockReturnValue({ remote: BUNDLED_CKB_URL, readonly: true })
stubbedNetworsServiceGet.mockReturnValue({ remote: BUNDLED_CKB_URL, readonly: true, type: 0 })
getLocalNodeInfoMock.mockRejectedValue('not start')
nodeService = new NodeService()
})
Expand Down