-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/llm cex deposit entry points (#4680)
* chore(release): 🚀 prepare release [skip ci] * chore(prerelease): 🚀 entering prerelease mode * fix: add changeset * chore(prerelease): 🚀 release prerelease [LLD(2.68.1-next.0), LLM(3.31.0)] * Smartling on-demand translation delivery from release (#4651) * File apps/ledger-live-desktop/static/i18n/en/app.json was translated to ar-AE locale * File apps/ledger-live-desktop/static/i18n/en/app.json was translated to zh-CN locale * File apps/ledger-live-desktop/static/i18n/en/app.json was translated to fr-FR locale * File apps/ledger-live-desktop/static/i18n/en/app.json was translated to de-DE locale * File apps/ledger-live-desktop/static/i18n/en/app.json was translated to ja-JP locale * File apps/ledger-live-desktop/static/i18n/en/app.json was translated to ko-KR locale * File apps/ledger-live-desktop/static/i18n/en/app.json was translated to pt-BR locale * File apps/ledger-live-desktop/static/i18n/en/app.json was translated to ru-RU locale * File apps/ledger-live-desktop/static/i18n/en/app.json was translated to es-ES locale * File apps/ledger-live-desktop/static/i18n/en/app.json was translated to tr-TR locale * chore: update RELEASE_NOTES * chore(release): 🚀 prepare release [skip ci] * feat(llm/llc/native-ui): added deposit from cex entry point on the select crypto screen * undo some changes * fixed type issues * lint fixed * lint fixed * Add changeset --------- Co-authored-by: live-github-bot[bot] <105061298+live-github-bot[bot]@users.noreply.github.com> Co-authored-by: hzheng-ledger <[email protected]> Co-authored-by: ldg-smartling-sa <[email protected]>
- Loading branch information
1 parent
6eea7de
commit 8c1de2f
Showing
10 changed files
with
153 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"live-mobile": patch | ||
--- | ||
|
||
Add Entry point to CEX with feature flag |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
apps/ledger-live-mobile/src/screens/ReceiveFunds/DepositFromCoinbaseButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React from "react"; | ||
import { Linking } from "react-native"; | ||
import { useTranslation } from "react-i18next"; | ||
import { Flex, BannerCard } from "@ledgerhq/native-ui"; | ||
import { useFeature } from "@ledgerhq/live-common/featureFlags/index"; | ||
import { CexDepositEntryPointsLocationsMobile } from "@ledgerhq/types-live/lib/cexDeposit"; | ||
import { track } from "../../analytics"; | ||
import CoinbaseIcon from "../../icons/Coinbase"; | ||
|
||
type Props = { | ||
location: CexDepositEntryPointsLocationsMobile; | ||
source: string; | ||
}; | ||
const DepositFromCoinbaseButton = ({ location, source }: Props) => { | ||
const { t } = useTranslation(); | ||
const cexDepositEntryPointsMobile = useFeature("cexDepositEntryPointsMobile"); | ||
|
||
const onPressDepositFromCex = () => { | ||
const path = cexDepositEntryPointsMobile?.params?.path; | ||
|
||
if (path) { | ||
Linking.canOpenURL(path).then(() => Linking.openURL(path)); | ||
track("button_clicked", { | ||
button: "deposit from coinbase", | ||
page: source, | ||
}); | ||
} | ||
}; | ||
|
||
if ( | ||
!cexDepositEntryPointsMobile?.enabled || | ||
!cexDepositEntryPointsMobile?.params?.locations?.[location] || | ||
!cexDepositEntryPointsMobile?.params?.path | ||
) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<Flex mx={6} mb={3}> | ||
<BannerCard | ||
typeOfRightIcon="arrow" | ||
title={t("transfer.receive.selectNetwork.depositFromCexBannerTitle")} | ||
LeftElement={<CoinbaseIcon />} | ||
hideLeftElementContainer | ||
onPress={onPressDepositFromCex} | ||
/> | ||
</Flex> | ||
); | ||
}; | ||
|
||
export default DepositFromCoinbaseButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export enum CexDepositEntryPointsLocationsDesktop { | ||
selectCrypto = "selectCrypto", | ||
} | ||
|
||
export enum CexDepositEntryPointsLocationsMobile { | ||
selectCrypto = "selectCrypto", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8c1de2f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
live-common-tools – ./apps/web-tools
ledger-live-tools.vercel.app
live-common-tools-ledgerhq.vercel.app
live.ledger.tools
live-common-tools-git-develop-ledgerhq.vercel.app
ledger-live.vercel.app