diff --git a/apps/ledger-live-mobile/e2e/page/onboarding/onboardingSteps.page.ts b/apps/ledger-live-mobile/e2e/page/onboarding/onboardingSteps.page.ts index 04ac0df25cac..626988076416 100644 --- a/apps/ledger-live-mobile/e2e/page/onboarding/onboardingSteps.page.ts +++ b/apps/ledger-live-mobile/e2e/page/onboarding/onboardingSteps.page.ts @@ -21,7 +21,6 @@ export default class OnboardingStepsPage { buyLedgerButton = () => getElementById("onboarding-noLedgerYetModal-buy"); exploreWithoutDeviceButton = () => getElementById(this.exploreWithoutDeviceButtonId); connectLedgerButton = () => getElementById("Existing Wallet | Connect"); - pairNanoButton = () => getElementById("Onboarding-PairNewNano"); maybeLaterButton = () => getElementById("notifications-prompt-later"); setupLedger = "onboarding-setupLedger"; @@ -157,10 +156,6 @@ export default class OnboardingStepsPage { await tapById(this.quizzFinalCta); } - async selectPairMyNano() { - await tapByElement(this.pairNanoButton()); - } - async declineNotifications() { await tapByElement(this.maybeLaterButton()); } diff --git a/apps/ledger-live-mobile/e2e/specs/onboarding.spec.ts b/apps/ledger-live-mobile/e2e/specs/onboarding.spec.ts index a4f0f1e0e21d..6856a05e1e42 100644 --- a/apps/ledger-live-mobile/e2e/specs/onboarding.spec.ts +++ b/apps/ledger-live-mobile/e2e/specs/onboarding.spec.ts @@ -20,7 +20,6 @@ describe("Onboarding", () => { await app.onboarding.startOnboarding(); await app.onboarding.chooseToAccessYourWallet(); await app.onboarding.chooseToConnectYourLedger(); - await app.onboarding.selectPairMyNano(); await app.common.selectAddDevice(); await app.common.addDeviceViaBluetooth(); await app.portfolio.waitForPortfolioPageToLoad(); @@ -33,7 +32,6 @@ describe("Onboarding", () => { await app.onboarding.chooseSetupLedger(); await app.onboarding.chooseDevice("nanoX"); await app.onboarding.goesThroughRestorePhrase(); - await app.onboarding.selectPairMyNano(); await app.common.selectAddDevice(); await app.common.addDeviceViaBluetooth(); await app.portfolio.waitForPortfolioPageToLoad(); @@ -52,7 +50,6 @@ describe("Onboarding", () => { await app.onboarding.checkDeviceNotCompatible(); } else { await app.onboarding.goesThroughRestorePhrase(); - await app.onboarding.selectPairMyNano(); await app.common.addDeviceViaUSB("nanoSP"); await app.portfolio.waitForPortfolioPageToLoad(); } @@ -64,7 +61,6 @@ describe("Onboarding", () => { await app.onboarding.chooseSetupLedger(); await app.onboarding.chooseDevice("nanoX"); await app.onboarding.goesThroughCreateWallet(); - await app.onboarding.selectPairMyNano(); await app.common.selectAddDevice(); await app.common.addDeviceViaBluetooth(); await app.portfolio.waitForPortfolioPageToLoad(); diff --git a/apps/ledger-live-mobile/src/screens/Onboarding/steps/pairNew.tsx b/apps/ledger-live-mobile/src/screens/Onboarding/steps/pairNew.tsx index 8fd7aa9761d6..96acbb2c89d8 100644 --- a/apps/ledger-live-mobile/src/screens/Onboarding/steps/pairNew.tsx +++ b/apps/ledger-live-mobile/src/screens/Onboarding/steps/pairNew.tsx @@ -1,11 +1,11 @@ -import React, { useCallback, useMemo, memo } from "react"; +import React, { useCallback, memo } from "react"; import { useNavigation, useRoute } from "@react-navigation/native"; +import { Flex, IconsLegacy } from "@ledgerhq/native-ui"; import { useDispatch } from "react-redux"; import { NavigatorName, ScreenName } from "~/const"; -import BaseStepperView, { PairNew, ConnectNano } from "./setupDevice/scenes"; +import { ConnectDevice } from "./setupDevice/scenes"; import { TrackScreen } from "~/analytics"; import SeedWarning from "../shared/SeedWarning"; -import Illustration from "~/images/illustration/Illustration"; import { completeOnboarding, setHasBeenRedirectedToPostOnboarding, @@ -20,28 +20,49 @@ import { } from "~/components/RootNavigator/types/helpers"; import { OnboardingNavigatorParamList } from "~/components/RootNavigator/types/OnboardingNavigator"; import { BaseOnboardingNavigatorParamList } from "~/components/RootNavigator/types/BaseOnboardingNavigator"; -import { Step } from "./setupDevice/scenes/BaseStepperView"; +import styled from "styled-components/native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import Button from "~/components/PreventDoubleClickButton"; -const images = { - light: { - Intro: require("~/images/illustration/Light/_076.png"), - }, - dark: { - Intro: require("~/images/illustration/Dark/_076.png"), - }, -}; - -type Metadata = { - id: string; - illustration: JSX.Element | null; - drawer: null | { route: string; screen: string }; -}; +const StyledContainerView = styled(Flex)` + padding-left: 16px; + padding-right: 16px; + padding-top: 32px; + flex: 1; +`; type NavigationProps = RootComposite< StackNavigatorProps >; -const scenes = [PairNew, ConnectNano] as Step[]; +const StyledSafeAreaView = styled(SafeAreaView)` + flex: 1; + background-color: ${p => p.theme.colors.background.main}; +`; + +const ImageHeader = () => { + const navigation = useNavigation(); + return ( + + + ) : null} ); }; -ConnectNanoScene.id = "ConnectNanoScene"; -ConnectNanoScene.contentContainerStyle = { padding: 16, flex: 1 }; - -const Next = ({ onNext }: { onNext: () => void }) => { - const dispatch = useDispatch(); - - return __DEV__ ? ( - - ) : null; -}; - -ConnectNanoScene.Next = Next; - -export default ConnectNanoScene; +export default ConnectDevice; diff --git a/apps/ledger-live-mobile/src/screens/Onboarding/steps/setupDevice/scenes/PairNew.tsx b/apps/ledger-live-mobile/src/screens/Onboarding/steps/setupDevice/scenes/PairNew.tsx deleted file mode 100644 index 0ab62269e7f7..000000000000 --- a/apps/ledger-live-mobile/src/screens/Onboarding/steps/setupDevice/scenes/PairNew.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from "react"; -import { useTranslation } from "react-i18next"; -import { Text } from "@ledgerhq/native-ui"; -import Button from "~/components/PreventDoubleClickButton"; - -const PairNewScene = ({ deviceModelId }: { deviceModelId?: string }) => { - const { t } = useTranslation(); - - return ( - <> - - {t(`onboarding.stepPairNew.${deviceModelId ?? "generic"}.title`)} - - - {t(`onboarding.stepPairNew.${deviceModelId ?? "generic"}.desc`)} - - - ); -}; - -PairNewScene.id = "PairNewScene"; - -const Next = ({ onNext, deviceModelId }: { onNext: () => void; deviceModelId?: string }) => { - const { t } = useTranslation(); - - return ( - - ); -}; - -PairNewScene.Next = Next; - -export default PairNewScene; diff --git a/apps/ledger-live-mobile/src/screens/Onboarding/steps/setupDevice/scenes/index.tsx b/apps/ledger-live-mobile/src/screens/Onboarding/steps/setupDevice/scenes/index.tsx index 1b534f421ec2..8cb5d6158590 100644 --- a/apps/ledger-live-mobile/src/screens/Onboarding/steps/setupDevice/scenes/index.tsx +++ b/apps/ledger-live-mobile/src/screens/Onboarding/steps/setupDevice/scenes/index.tsx @@ -6,8 +6,7 @@ export { default as RecoveryPhrase } from "./RecoveryPhrase"; export { default as RecoveryPhraseInstructions } from "./RecoveryPhraseInstructions"; export { default as RecoveryPhraseSetup } from "./RecoveryPhraseSetup"; export { default as HideRecoveryPhrase } from "./HideRecoveryPhrase"; -export { default as PairNew } from "./PairNew"; -export { default as ConnectNano } from "./ConnectNano"; +export { default as ConnectDevice } from "./ConnectDevice"; export { default as QuizzFinal } from "./QuizzFinal"; export { default as SyncDesktop } from "./SyncDesktop";