diff --git a/.changeset/polite-donuts-peel.md b/.changeset/polite-donuts-peel.md new file mode 100644 index 000000000000..cc633a8742fa --- /dev/null +++ b/.changeset/polite-donuts-peel.md @@ -0,0 +1,5 @@ +--- +"ledger-live-desktop": patch +--- + +Add vertical scroll inside optin prompt and correct variable name. Fix export account row from settings that was hidden when LS enabled diff --git a/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/hooks/useCommonLogic.tsx b/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/hooks/useCommonLogic.tsx index c388a185bccc..c2e2e237a8c7 100644 --- a/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/hooks/useCommonLogic.tsx +++ b/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/hooks/useCommonLogic.tsx @@ -30,7 +30,7 @@ export const useAnalyticsOptInPrompt = ({ entryPoint }: Props) => { const dispatch = useDispatch(); - const [isAnalitycsOptInPromptOpened, setIsAnalitycsOptInPromptOpened] = useState(false); + const [isAnalyticsOptInPromptOpened, setIsAnalyticsOptInPromptOpened] = useState(false); const [nextStep, setNextStep] = useState<(() => void) | null>(null); const flow = trackingKeysByFlow?.[entryPoint]; @@ -45,12 +45,12 @@ export const useAnalyticsOptInPrompt = ({ entryPoint }: Props) => { [ABTestingVariants.variantB]: privacyPolicyUrl, }; - const openAnalitycsOptInPrompt = useCallback( + const openAnalyticsOptInPrompt = useCallback( (routePath: string, callBack: () => void) => { - setIsAnalitycsOptInPromptOpened(true); + setIsAnalyticsOptInPromptOpened(true); setNextStep(() => callBack); }, - [setIsAnalitycsOptInPromptOpened], + [setIsAnalyticsOptInPromptOpened], ); const isEntryPointIncludedInFlagParams = lldAnalyticsOptInPromptFlag?.params?.entryPoints @@ -71,7 +71,7 @@ export const useAnalyticsOptInPrompt = ({ entryPoint }: Props) => { ); const onSubmit = () => { - setIsAnalitycsOptInPromptOpened(false); + setIsAnalyticsOptInPromptOpened(false); dispatch(setHasSeenAnalyticsOptInPrompt(true)); if (entryPoint === EntryPoint.onboarding) { nextStep?.(); @@ -80,8 +80,8 @@ export const useAnalyticsOptInPrompt = ({ entryPoint }: Props) => { }; const analyticsOptInPromptProps = { - onClose: () => setIsAnalitycsOptInPromptOpened(false), - isOpened: isAnalitycsOptInPromptOpened, + onClose: () => setIsAnalyticsOptInPromptOpened(false), + isOpened: isAnalyticsOptInPromptOpened, entryPoint: entryPoint, variant, }; @@ -101,8 +101,8 @@ export const useAnalyticsOptInPrompt = ({ entryPoint }: Props) => { }; return { - openAnalitycsOptInPrompt, - setIsAnalitycsOptInPromptOpened, + openAnalyticsOptInPrompt, + setIsAnalyticsOptInPromptOpened, onSubmit, analyticsOptInPromptProps, isFeatureFlagsAnalyticsPrefDisplayed: isFlagEnabled, diff --git a/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/hooks/useDisplayOnPortfolio.tsx b/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/hooks/useDisplayOnPortfolio.tsx index 5e16695df3b6..194ce8bba4ed 100644 --- a/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/hooks/useDisplayOnPortfolio.tsx +++ b/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/hooks/useDisplayOnPortfolio.tsx @@ -5,7 +5,7 @@ import { EntryPoint } from "../types/AnalyticsOptInPromptNavigator"; export const useDisplayOnPortfolioAnalytics = () => { const { analyticsOptInPromptProps, - setIsAnalitycsOptInPromptOpened, + setIsAnalyticsOptInPromptOpened, isFeatureFlagsAnalyticsPrefDisplayed, onSubmit, } = useAnalyticsOptInPrompt({ entryPoint: EntryPoint.portfolio }); @@ -16,8 +16,8 @@ export const useDisplayOnPortfolioAnalytics = () => { }; useEffect(() => { - if (isFeatureFlagsAnalyticsPrefDisplayed) setIsAnalitycsOptInPromptOpened(true); - }, [isFeatureFlagsAnalyticsPrefDisplayed, setIsAnalitycsOptInPromptOpened]); + if (isFeatureFlagsAnalyticsPrefDisplayed) setIsAnalyticsOptInPromptOpened(true); + }, [isFeatureFlagsAnalyticsPrefDisplayed, setIsAnalyticsOptInPromptOpened]); return { analyticsOptInPromptProps: extendedAnalyticsOptInPromptProps, diff --git a/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantA/Main/index.tsx b/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantA/Main/index.tsx index 30e68c892a98..2bb02fa82510 100644 --- a/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantA/Main/index.tsx +++ b/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantA/Main/index.tsx @@ -19,7 +19,14 @@ const Main = ({ shouldWeTrack, handleOpenPrivacyPolicy }: MainProps) => { return ( <> - + handleOpenPrivacyPolicy(page)} /> diff --git a/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantB/Analytics/index.tsx b/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantB/Analytics/index.tsx index 86274d20b998..7349e6f958a5 100644 --- a/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantB/Analytics/index.tsx +++ b/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantB/Analytics/index.tsx @@ -39,7 +39,13 @@ const AnalyticsScreen = ({ return ( <> - +
handleOpenPrivacyPolicy(page)} /> diff --git a/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantB/PersonalRecommendations/index.tsx b/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantB/PersonalRecommendations/index.tsx index c8defc6e009b..7a4cdf46a773 100644 --- a/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantB/PersonalRecommendations/index.tsx +++ b/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantB/PersonalRecommendations/index.tsx @@ -33,7 +33,7 @@ const RecommandationsScreen = ({ return ( <> - +
handleOpenPrivacyPolicy(page)} /> diff --git a/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantB/index.tsx b/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantB/index.tsx index 7ea8f9b8324f..dedde1a751ce 100644 --- a/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantB/index.tsx +++ b/apps/ledger-live-desktop/src/newArch/features/AnalyticsOptInPrompt/screens/VariantB/index.tsx @@ -22,7 +22,7 @@ const VariantB = ({ entryPoint, onSubmit, step, setStep }: VariantBProps) => { }); return ( <> - + {step === 0 ? ( { isFeatureFlagsAnalyticsPrefDisplayed - ? openAnalitycsOptInPrompt("Onboarding", handleAcceptTermsAndGetStarted) + ? openAnalyticsOptInPrompt("Onboarding", handleAcceptTermsAndGetStarted) : handleAcceptTermsAndGetStarted(); }} mb="5" @@ -194,7 +194,7 @@ export function Welcome() { variant="main" onClick={_ => { isFeatureFlagsAnalyticsPrefDisplayed - ? openAnalitycsOptInPrompt("Onboarding", buyNanoX) + ? openAnalyticsOptInPrompt("Onboarding", buyNanoX) : buyNanoX(); }} outline={true} diff --git a/apps/ledger-live-desktop/src/renderer/screens/settings/sections/Accounts/Export.tsx b/apps/ledger-live-desktop/src/renderer/screens/settings/sections/Accounts/Export.tsx index 847592fe76d0..0ee2b076abca 100644 --- a/apps/ledger-live-desktop/src/renderer/screens/settings/sections/Accounts/Export.tsx +++ b/apps/ledger-live-desktop/src/renderer/screens/settings/sections/Accounts/Export.tsx @@ -5,9 +5,12 @@ import { openModal } from "~/renderer/actions/modals"; import Button from "~/renderer/components/Button"; import ExportOperationsBtn from "~/renderer/components/ExportOperationsBtn"; import { SettingsSectionRow as Row } from "../../SettingsSection"; +import { useFeature } from "@ledgerhq/live-common/featureFlags/index"; const SectionExport = () => { const dispatch = useDispatch(); const { t } = useTranslation(); + const ledgerSyncFF = useFeature("lldWalletSync"); + const onModalOpen = useCallback( (e: SyntheticEvent) => { e.preventDefault(); @@ -17,11 +20,13 @@ const SectionExport = () => { ); return ( <> - - - + {!ledgerSyncFF?.enabled && ( + + + + )} - {!ledgerSyncFF?.enabled && } +