diff --git a/packages/neuron-wallet/src/services/node.ts b/packages/neuron-wallet/src/services/node.ts index d9731d2328..220bb5fa35 100644 --- a/packages/neuron-wallet/src/services/node.ts +++ b/packages/neuron-wallet/src/services/node.ts @@ -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 } diff --git a/packages/neuron-wallet/tests/services/node.test.ts b/packages/neuron-wallet/tests/services/node.test.ts index 29fafa3f4d..bff33582fb 100644 --- a/packages/neuron-wallet/tests/services/node.test.ts +++ b/packages/neuron-wallet/tests/services/node.test.ts @@ -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() })