From 597c987ee785606990fd593d92f1657115f805c8 Mon Sep 17 00:00:00 2001 From: Jean Ribeiro Date: Thu, 16 May 2024 12:53:07 -0300 Subject: [PATCH] fix: search more than one account (#2502) --- .../desktop/components/popup/popups/SyncAccountsPopup.svelte | 2 +- .../views/restore-profile/views/BalanceFinderView.svelte | 4 ++-- .../default-account-recovery-configuration.constant.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/desktop/components/popup/popups/SyncAccountsPopup.svelte b/packages/desktop/components/popup/popups/SyncAccountsPopup.svelte index fed8ada116..c62141e6c9 100644 --- a/packages/desktop/components/popup/popups/SyncAccountsPopup.svelte +++ b/packages/desktop/components/popup/popups/SyncAccountsPopup.svelte @@ -75,7 +75,7 @@ isDepthSearch = true recoverAccountsPayload = { accountStartIndex: isSingleAccountSearch ? $selectedAccountIndex : accountGapLimit, - accountGapLimit: 0, + accountGapLimit: 1, addressGapLimit: isSingleAccountSearch ? addressGapLimit : (searchCount - depthSearchCount) * addressGapLimit, diff --git a/packages/desktop/views/onboarding/views/restore-profile/views/BalanceFinderView.svelte b/packages/desktop/views/onboarding/views/restore-profile/views/BalanceFinderView.svelte index e347257156..fdc6b09d92 100644 --- a/packages/desktop/views/onboarding/views/restore-profile/views/BalanceFinderView.svelte +++ b/packages/desktop/views/onboarding/views/restore-profile/views/BalanceFinderView.svelte @@ -45,7 +45,7 @@ const recoverAccountsPayload: RecoverAccountsPayload = { accountStartIndex, accountGapLimit, - addressGapLimit: 0, + addressGapLimit: 1, syncOptions: { ...DEFAULT_SYNC_OPTIONS, addressStartIndex: 0 }, } @@ -72,7 +72,7 @@ depthSearch = true recoverAccountsPayload = { accountStartIndex: accountGapLimit, - accountGapLimit: 0, + accountGapLimit: 1, addressGapLimit: (searchCount - depthSearchCount) * addressGapLimit, syncOptions: { ...DEFAULT_SYNC_OPTIONS, addressStartIndex: 0 }, } diff --git a/packages/shared/src/lib/core/profile/constants/default-account-recovery-configuration.constant.ts b/packages/shared/src/lib/core/profile/constants/default-account-recovery-configuration.constant.ts index a40bc12753..0415d50222 100644 --- a/packages/shared/src/lib/core/profile/constants/default-account-recovery-configuration.constant.ts +++ b/packages/shared/src/lib/core/profile/constants/default-account-recovery-configuration.constant.ts @@ -4,13 +4,13 @@ import { AccountRecoveryConfiguration } from '../types' export const DEFAULT_ACCOUNT_RECOVERY_CONFIGURATION: AccountRecoveryConfiguration = { [ProfileType.Ledger]: { initialAccountRange: 3, - accountGapLimit: 0, + accountGapLimit: 1, numberOfRoundsBetweenBreadthSearch: 1, addressGapLimit: 5, }, [ProfileType.Software]: { initialAccountRange: 10, - accountGapLimit: 0, + accountGapLimit: 1, numberOfRoundsBetweenBreadthSearch: 1, addressGapLimit: 100, },