Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/ LIVE-3509 - LLM Deeplinks updated for buy/sell live apps flow #1105

Merged
merged 1 commit into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/big-windows-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

LLM - Deeplinks updated for buy sell flows with live apps
6 changes: 6 additions & 0 deletions apps/ledger-live-mobile/docs/linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ They all are prefixed by **_ledgerlive://_**

`ledgerlive://buy/bitcoin` will redirect to buy page with bitcoin accounts search prefilled

- **_sell/:currency_** πŸ ’ Sell Crypto Flow

`ledgerlive://sell` will redirect to sell page

`ledgerlive://sell/bitcoin` will redirect to sell page with bitcoin accounts search prefilled

- **_manager_** πŸ ’ Manager page

`ledgerlive://manager` will redirect to manager page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { createStackNavigator } from "@react-navigation/stack";
import { useTheme } from "styled-components/native";
import { Icons, Flex } from "@ledgerhq/native-ui";
import { useFeature } from "@ledgerhq/live-common/featureFlags/index";
import { findCryptoCurrencyByKeyword } from "@ledgerhq/live-common/currencies/index";
import { ScreenName } from "../../const";
import { getStackNavigatorConfig } from "../../navigation/navigatorConfig";

Expand Down Expand Up @@ -46,7 +47,10 @@ export default function ExchangeLiveAppNavigator({ route }: any) {
platform:
ptxSmartRoutingMobile?.params?.liveAppId || "multibuy",
mode: "buy",
currency: _props.route.params?.defaultCurrencyId,
currency: _props.route.params?.currency
? findCryptoCurrencyByKeyword(_props.route.params?.currency)
?.id
: _props.route.params?.defaultCurrencyId,
account: _props.route.params?.defaultAccountId,
},
}}
Expand Down Expand Up @@ -75,7 +79,10 @@ export default function ExchangeLiveAppNavigator({ route }: any) {
platform:
ptxSmartRoutingMobile?.params?.liveAppId || "multibuy",
mode: "sell",
currency: _props.route.params?.defaultCurrencyId,
currency: _props.route.params?.currency
? findCryptoCurrencyByKeyword(_props.route.params?.currency)
?.id
: _props.route.params?.defaultCurrencyId,
account: _props.route.params?.defaultAccountId,
},
}}
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-mobile/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ const linkingOptions = {
initialRouteName: "buy",
screens: {
[ScreenName.ExchangeBuy]: "buy/:currency?",
[ScreenName.ExchangeSell]: "sell/:currency?",
},
},

Expand Down