diff --git a/packages/desktop/views/onboarding/views/complete-onboarding/views/FinishOnboardingView.svelte b/packages/desktop/views/onboarding/views/complete-onboarding/views/FinishOnboardingView.svelte index 7455467a7da..cac8c6a3285 100644 --- a/packages/desktop/views/onboarding/views/complete-onboarding/views/FinishOnboardingView.svelte +++ b/packages/desktop/views/onboarding/views/complete-onboarding/views/FinishOnboardingView.svelte @@ -7,11 +7,14 @@ completeOnboardingProcess, isOnboardingLedgerProfile, onboardingProfile, + updateOnboardingProfile, } from '@contexts/onboarding' import { mobile } from '@core/app' import { localize } from '@core/i18n' import { checkOrConnectLedger } from '@core/ledger' + import { ProfileType } from '@core/profile' import { setStrongholdPassword } from '@core/profile-manager' + import { STRONGHOLD_VERSION } from '@core/stronghold' import { Animation, Button, Icon, Text, TextHint } from '@ui' import { TextType } from '@ui/enums' import { onboardingRouter } from '@views/onboarding/onboarding-router' @@ -29,6 +32,9 @@ if ($onboardingProfile?.restoreProfileType === RestoreProfileType.Stronghold) { await setStrongholdPassword($onboardingProfile.strongholdPassword) } + const isLedgerProfile = $onboardingProfile?.type === ProfileType.Ledger + const strongholdVersion = isLedgerProfile ? undefined : STRONGHOLD_VERSION + updateOnboardingProfile({ ...(strongholdVersion && { strongholdVersion }) }) completeOnboardingProcess() $onboardingRouter.next() return Promise.resolve() diff --git a/packages/desktop/views/onboarding/views/create-profile/views/ChooseCreateProfileFlowView.svelte b/packages/desktop/views/onboarding/views/create-profile/views/ChooseCreateProfileFlowView.svelte index e61c07687d0..da3c9189231 100644 --- a/packages/desktop/views/onboarding/views/create-profile/views/ChooseCreateProfileFlowView.svelte +++ b/packages/desktop/views/onboarding/views/create-profile/views/ChooseCreateProfileFlowView.svelte @@ -15,7 +15,6 @@ import { destroyProfileManager } from '@core/profile-manager/actions' import { Icon as IconEnum } from '@auxiliary/icon' import { AnimationEnum } from '@auxiliary/animation' - import { STRONGHOLD_VERSION } from '@core/stronghold' let isBusy = { [CreateProfileType.Mnemonic]: false, @@ -28,10 +27,8 @@ async function onProfileTypeClick(createProfileType: CreateProfileType): Promise { isBusy = { ...isBusy, [createProfileType]: true } - const isLedgerProfile = createProfileType === CreateProfileType.Ledger - const type = isLedgerProfile ? ProfileType.Ledger : ProfileType.Software - const strongholdVersion = isLedgerProfile ? undefined : STRONGHOLD_VERSION - updateOnboardingProfile({ createProfileType, type, ...(strongholdVersion && { strongholdVersion }) }) + const type = createProfileType === CreateProfileType.Ledger ? ProfileType.Ledger : ProfileType.Software + updateOnboardingProfile({ createProfileType, type }) await initialiseProfileManagerFromOnboardingProfile() $createProfileRouter.next() }