Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LIVE-12571 #6863

Merged
merged 1 commit into from
May 16, 2024
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
5 changes: 5 additions & 0 deletions .changeset/four-dolls-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": minor
---

Fix LIVE-12571 where some users can't unlock LLD when they have set up a password
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useFeature } from "@ledgerhq/live-common/featureFlags/index";
import { saveSettings } from "~/renderer/actions/settings";
import { useDispatch, useSelector } from "react-redux";
import { useLocation } from "react-router-dom";
import { isLocked as isLockedSelector } from "~/renderer/reducers/application";
import { hasCompletedOnboardingSelector } from "~/renderer/reducers/settings";
import { useCustomPath } from "@ledgerhq/live-common/hooks/recoverFeatureFlag";

Expand All @@ -13,6 +14,7 @@ const ONBOARDED_VIA_RECOVER_RESTORE_USER_PREFIX = "ONBOARDED_VIA_RECOVER_RESTORE
export const useRecoverRestoreOnboarding = (seedPathStatus?: string) => {
const { pathname } = useLocation();
const dispatch = useDispatch();
const isLocked = useSelector(isLockedSelector);
const recoverServices = useFeature("protectServicesDesktop");
const recoverStoreId = recoverServices?.params?.protectId ?? "";
const hasCompletedOnboarding = useSelector(hasCompletedOnboardingSelector);
Expand All @@ -29,13 +31,14 @@ export const useRecoverRestoreOnboarding = (seedPathStatus?: string) => {
const hasCompletedOnboardingViaRestore = status === "true";

setOnboardedViaRecoverRestore(hasCompletedOnboardingViaRestore);

dispatch(
saveSettings({
hasCompletedOnboarding: onboardedViaRecoverRestore,
}),
);
}, [dispatch, onboardedViaRecoverRestore, recoverStoreId]);
if (!isLocked) {
dispatch(
saveSettings({
hasCompletedOnboarding: onboardedViaRecoverRestore,
}),
);
}
}, [dispatch, isLocked, onboardedViaRecoverRestore, recoverStoreId]);

useEffect(() => {
const userIsOnboardingOrSettingUp =
Expand Down
Loading