diff --git a/packages/neuron-wallet/src/listeners/address.ts b/packages/neuron-wallet/src/listeners/address.ts index 88db8a9e89..0134dd866a 100644 --- a/packages/neuron-wallet/src/listeners/address.ts +++ b/packages/neuron-wallet/src/listeners/address.ts @@ -28,7 +28,8 @@ export const register = () => { walletIds.map(async id => { const wallet = WalletService.getInstance().get(id) const accountExtendedPublicKey: AccountExtendedPublicKey = wallet.accountExtendedPublicKey() - await AddressService.checkAndGenerateSave(id, accountExtendedPublicKey, true, 20, 10) + // set isImport to undefined means unknown + await AddressService.checkAndGenerateSave(id, accountExtendedPublicKey, undefined, 20, 10) }) ) }) diff --git a/packages/neuron-wallet/src/startup/sync-block-task/indexer.ts b/packages/neuron-wallet/src/startup/sync-block-task/indexer.ts index 10c2a567a0..6f92cebb41 100644 --- a/packages/neuron-wallet/src/startup/sync-block-task/indexer.ts +++ b/packages/neuron-wallet/src/startup/sync-block-task/indexer.ts @@ -43,10 +43,12 @@ export const switchNetwork = async (nodeURL: string) => { const infos: LockHashInfo[] = (await Promise.all( addressWithWay.map(async aw => { const hashes: string[] = await LockUtils.addressToAllLockHashes(aw.address.address) + // undefined means true + const isImport: boolean = aw.isImport !== false return hashes.map(h => { return { lockHash: h, - isImport: aw.isImport, + isImport, } }) }) diff --git a/packages/neuron-wallet/src/startup/sync-block-task/sync.ts b/packages/neuron-wallet/src/startup/sync-block-task/sync.ts index 0b5f3b2f7e..91da8ff057 100644 --- a/packages/neuron-wallet/src/startup/sync-block-task/sync.ts +++ b/packages/neuron-wallet/src/startup/sync-block-task/sync.ts @@ -44,10 +44,12 @@ export const switchNetwork = async () => { const infos: LockHashInfo[] = (await Promise.all( addressWithWay.map(async aw => { const hashes: string[] = await LockUtils.addressToAllLockHashes(aw.address.address) + // undefined means false + const isImport: boolean = aw.isImport === true return hashes.map(h => { return { lockHash: h, - isImport: aw.isImport, + isImport, } }) })