diff --git a/.changeset/orange-chicken-cross.md b/.changeset/orange-chicken-cross.md new file mode 100644 index 000000000000..3ad950bd071a --- /dev/null +++ b/.changeset/orange-chicken-cross.md @@ -0,0 +1,5 @@ +--- +"live-mobile": minor +--- + +Update LNX drawer in reborn experience to use Flex instead diff --git a/apps/ledger-live-mobile/assets/videos/flex.mp4 b/apps/ledger-live-mobile/assets/videos/flex.mp4 new file mode 100644 index 000000000000..69aab14b4960 Binary files /dev/null and b/apps/ledger-live-mobile/assets/videos/flex.mp4 differ diff --git a/apps/ledger-live-mobile/assets/videos/index.ts b/apps/ledger-live-mobile/assets/videos/index.ts index de9012808394..cc58bd3412e1 100644 --- a/apps/ledger-live-mobile/assets/videos/index.ts +++ b/apps/ledger-live-mobile/assets/videos/index.ts @@ -10,4 +10,5 @@ export default { infinityPassPart02Light: require("./infinityPassLight/infinityPassPart02.mp4"), customLockScreenBannerLight: require("./customLockScreenBanner/customLockScreenBannerLight.mp4"), customLockScreenBannerDark: require("./customLockScreenBanner/customLockScreenBannerDark.mp4"), + flex: require("./flex.mp4"), }; diff --git a/apps/ledger-live-mobile/src/components/RootNavigator/BaseNavigator.tsx b/apps/ledger-live-mobile/src/components/RootNavigator/BaseNavigator.tsx index dfec029aab31..f170b16cd882 100644 --- a/apps/ledger-live-mobile/src/components/RootNavigator/BaseNavigator.tsx +++ b/apps/ledger-live-mobile/src/components/RootNavigator/BaseNavigator.tsx @@ -209,7 +209,6 @@ export default function BaseNavigator() { options={{ headerStyle: styles.headerNoShadow, }} - {...noNanoBuyNanoWallScreenOptions} /> p.theme.colors.background.main}; + background-color: ${p => p.theme.colors.background.default}; + padding-top: ${p => p.theme.space[10]}px; +`; + +const CloseButton = styled(TouchableOpacity)` + background-color: ${p => p.theme.colors.neutral.c30}; + padding: 8px; + border-radius: 32px; `; const items = [ { title: "buyDevice.0.title", desc: "buyDevice.0.desc", - Icon: IconsLegacy.CrownMedium, + Icon: Icons.Coins, }, { title: "buyDevice.1.title", desc: "buyDevice.1.desc", - Icon: IconsLegacy.LendMedium, + Icon: Icons.GraphAsc, }, { title: "buyDevice.2.title", desc: "buyDevice.2.desc", - Icon: IconsLegacy.ClaimRewardsMedium, + Icon: Icons.Globe, }, { title: "buyDevice.3.title", desc: "buyDevice.3.desc", - Icon: IconsLegacy.NanoXAltMedium, + Icon: Icons.Flex, }, ]; const videoStyle = { height: "100%", - width: "100%", - position: "absolute", - top: 0, - left: 0, - bottom: 0, - right: 0, }; type NavigationProp = BaseNavigationComposite< @@ -88,7 +87,7 @@ type NavigationProp = BaseNavigationComposite< export default function GetDeviceScreen() { const { t } = useTranslation(); const navigation = useNavigation(); - const { theme, colors } = useTheme(); + const { colors } = useTheme(); const { setShowWelcome, setFirstTimeOnboarding } = useNavigationInterceptor(); const buyDeviceFromLive = useFeature("buyDeviceFromLive"); const hasCompletedOnboarding = useSelector(hasCompletedOnboardingSelector); @@ -138,7 +137,7 @@ export default function GetDeviceScreen() { // @ts-expect-error This seem very impossible to type because ts is right… navigation.navigate(ScreenName.PurchaseDevice); } else { - Linking.openURL(urls.buyNanoX); + Linking.openURL(urls.buyFlex); } // eslint-disable-next-line react-hooks/exhaustive-deps }, [buyDeviceFromLive?.enabled]); @@ -148,99 +147,108 @@ export default function GetDeviceScreen() { return ( {readOnlyModeEnabled ? : null} + {hasCompletedOnboarding ? ( - - ) : ( - - - - )} - - {t("buyDevice.title")} - - {hasCompletedOnboarding ? ( - - - + + + ) : ( )} - + {videoMounted && ( - + - - + diff --git a/apps/ledger-live-mobile/src/screens/Platform/v2/hooks.ts b/apps/ledger-live-mobile/src/screens/Platform/v2/hooks.ts index 903934f1c686..4b4bffe6cf64 100644 --- a/apps/ledger-live-mobile/src/screens/Platform/v2/hooks.ts +++ b/apps/ledger-live-mobile/src/screens/Platform/v2/hooks.ts @@ -15,6 +15,7 @@ import { DISCOVER_STORE_KEY, BROWSE_SEARCH_OPTIONS, WC_ID, + LEDGER_SHOP_ID, } from "@ledgerhq/live-common/wallet-api/constants"; import { DiscoverDB, AppManifest } from "@ledgerhq/live-common/wallet-api/types"; import { useNavigation, useRoute } from "@react-navigation/native"; @@ -128,7 +129,9 @@ function useDisclaimer(appendRecentlyUsed: (manifest: AppManifest) => void): Dis return; } - if (isReadOnly && !hasOrderedNano) { + const isLedgerShopApp = manifest.id === LEDGER_SHOP_ID; + + if (isReadOnly && !hasOrderedNano && !isLedgerShopApp) { navigateToRebornFlow(); return; } diff --git a/apps/ledger-live-mobile/src/screens/PurchaseDevice/index.tsx b/apps/ledger-live-mobile/src/screens/PurchaseDevice/index.tsx index af5c0b99273e..15168897d396 100644 --- a/apps/ledger-live-mobile/src/screens/PurchaseDevice/index.tsx +++ b/apps/ledger-live-mobile/src/screens/PurchaseDevice/index.tsx @@ -16,7 +16,7 @@ import WebViewScreen from "~/components/WebViewScreen"; import { completeOnboarding, setReadOnlyMode } from "~/actions/settings"; import { urls } from "~/utils/urls"; -const defaultURL = urls.buyNanoX; +const defaultURL = urls.buyFlex; const PurchaseDevice = () => { const { t } = useTranslation(); diff --git a/apps/ledger-live-mobile/src/utils/urls.tsx b/apps/ledger-live-mobile/src/utils/urls.tsx index 0fd754e885e0..a3a6777ccbba 100644 --- a/apps/ledger-live-mobile/src/utils/urls.tsx +++ b/apps/ledger-live-mobile/src/utils/urls.tsx @@ -60,6 +60,8 @@ export const urls = { ratingsContact: "https://support.ledger.com/article/4423020306705-zd", buyNanoX: "https://shop.ledger.com/products/ledger-nano-x?utm_source=ledger_live_mobile&utm_medium=self_referral&utm_content=onboarding", + buyFlex: + "https://shop.ledger.com/products/ledger-flex?utm_source=ledger_live_mobile&utm_medium=self_referral&utm_content=onboarding", playstore: "https://play.google.com/store/apps/details?id=com.ledger.live", applestoreRate: "https://apps.apple.com/app/id1361671700?action=write-review", applestore: diff --git a/libs/ledger-live-common/src/wallet-api/constants.ts b/libs/ledger-live-common/src/wallet-api/constants.ts index 915d5a04ed33..e7f54510f263 100644 --- a/libs/ledger-live-common/src/wallet-api/constants.ts +++ b/libs/ledger-live-common/src/wallet-api/constants.ts @@ -52,4 +52,6 @@ export const CARD_APP_ID = "card-program"; export const WC_ID = "ledger-wallet-connect"; +export const LEDGER_SHOP_ID = "ledger-shop"; + export const INTERNAL_APP_IDS = [DEFAULT_MULTIBUY_APP_ID, BUY_SELL_UI_APP_ID, CARD_APP_ID];