Skip to content

Commit

Permalink
Merge pull request #8362 from LedgerHQ/feat/buysell-correct-flow
Browse files Browse the repository at this point in the history
fix: paths
  • Loading branch information
chrisduma-ledger authored Nov 14, 2024
2 parents 0b5ef53 + 6f785c1 commit 22b95a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/mighty-points-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

Fixes buy/sell navigation paths
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const createExchangeScreen =
lastScreen,
platform,
referrer,
mode,
} = props.route.params || {};
const resolvedCurrency = currency
? findCryptoCurrencyByKeyword(currency)?.id
Expand All @@ -54,6 +55,7 @@ const createExchangeScreen =
lastScreen,
platform: platform || defaultPlatform,
referrer: referrer,
mode,
},
}}
/>
Expand All @@ -76,6 +78,7 @@ export default function ExchangeLiveAppNavigator() {
headerStyle: styles.headerNoShadow,
title: "",
}}
initialParams={{ mode: "onRamp" }}
>
{props => <ExchangeBuy {...props} />}
</Stack.Screen>
Expand All @@ -85,6 +88,7 @@ export default function ExchangeLiveAppNavigator() {
options={{
headerStyle: styles.headerNoShadow,
}}
initialParams={{ mode: "offRamp" }}
>
{props => <ExchangeSell {...props} />}
</Stack.Screen>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type ExchangeParams = CommonParams & {
defaultAccountId?: string;
defaultCurrencyId?: string;
defaultTicker?: string;
mode?: "offRamp" | "onRamp";
};

export type PtxNavigatorParamList = {
Expand Down

0 comments on commit 22b95a3

Please sign in to comment.