From e197cd5224ec5a054f1fd5e9478fc41ffe0da311 Mon Sep 17 00:00:00 2001 From: chrisduma-ledger Date: Wed, 13 Nov 2024 16:07:15 +0200 Subject: [PATCH 1/2] fix: paths --- .../src/components/RootNavigator/ExchangeLiveAppNavigator.tsx | 4 ++++ .../src/components/RootNavigator/types/PtxNavigator.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/apps/ledger-live-mobile/src/components/RootNavigator/ExchangeLiveAppNavigator.tsx b/apps/ledger-live-mobile/src/components/RootNavigator/ExchangeLiveAppNavigator.tsx index c4ff3d5039fe..e9f22438ef58 100644 --- a/apps/ledger-live-mobile/src/components/RootNavigator/ExchangeLiveAppNavigator.tsx +++ b/apps/ledger-live-mobile/src/components/RootNavigator/ExchangeLiveAppNavigator.tsx @@ -33,6 +33,7 @@ const createExchangeScreen = lastScreen, platform, referrer, + mode, } = props.route.params || {}; const resolvedCurrency = currency ? findCryptoCurrencyByKeyword(currency)?.id @@ -54,6 +55,7 @@ const createExchangeScreen = lastScreen, platform: platform || defaultPlatform, referrer: referrer, + mode, }, }} /> @@ -76,6 +78,7 @@ export default function ExchangeLiveAppNavigator() { headerStyle: styles.headerNoShadow, title: "", }} + initialParams={{ mode: "onRamp" }} > {props => } @@ -85,6 +88,7 @@ export default function ExchangeLiveAppNavigator() { options={{ headerStyle: styles.headerNoShadow, }} + initialParams={{ mode: "offRamp" }} > {props => } diff --git a/apps/ledger-live-mobile/src/components/RootNavigator/types/PtxNavigator.ts b/apps/ledger-live-mobile/src/components/RootNavigator/types/PtxNavigator.ts index d8d9e6e7b61d..30e32277e1ea 100644 --- a/apps/ledger-live-mobile/src/components/RootNavigator/types/PtxNavigator.ts +++ b/apps/ledger-live-mobile/src/components/RootNavigator/types/PtxNavigator.ts @@ -14,6 +14,7 @@ type ExchangeParams = CommonParams & { defaultAccountId?: string; defaultCurrencyId?: string; defaultTicker?: string; + mode?: "offRamp" | "onRamp"; }; export type PtxNavigatorParamList = { From 6f785c1662e440707bb0f94ac27efcd195bc0937 Mon Sep 17 00:00:00 2001 From: chrisduma-ledger Date: Wed, 13 Nov 2024 16:09:36 +0200 Subject: [PATCH 2/2] chore: changeset --- .changeset/mighty-points-hope.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/mighty-points-hope.md diff --git a/.changeset/mighty-points-hope.md b/.changeset/mighty-points-hope.md new file mode 100644 index 000000000000..6a124bef8407 --- /dev/null +++ b/.changeset/mighty-points-hope.md @@ -0,0 +1,5 @@ +--- +"live-mobile": patch +--- + +Fixes buy/sell navigation paths