Skip to content

Commit

Permalink
Merge pull request LedgerHQ#4808 from LedgerHQ/support/remove-source-…
Browse files Browse the repository at this point in the history
…param-recover-deeplinks

chore(recover): remove source query params
  • Loading branch information
stephane-lieumont-ledger authored Sep 25, 2023
2 parents 38bb6d2 + 881cd34 commit 2474481
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-shoes-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

remove source query params includes in featureflags
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@ import { Button, Tag, Text } from "@ledgerhq/native-ui";
import React, { useCallback } from "react";
import { Trans, useTranslation } from "react-i18next";
import { GestureResponderEvent, Linking } from "react-native";
import { urls } from "../../../config/urls";

function NewProtectState({ params }: { params: Record<string, string> }) {
const { t } = useTranslation();
const { learnMoreURI, alreadySubscribedURI } = params || {};

const onLearnMore = useCallback(() => {
const url = `${learnMoreURI}&source=${urls.recoverSources.myLedger}`;
Linking.canOpenURL(url).then(() => Linking.openURL(url));
Linking.canOpenURL(learnMoreURI).then(() => Linking.openURL(learnMoreURI));
}, [learnMoreURI]);

const onAlreadySubscribe = useCallback(() => {
const url = `${alreadySubscribedURI}&source=${urls.recoverSources.myLedger}`;
Linking.canOpenURL(url).then(() => Linking.openURL(url));
Linking.canOpenURL(alreadySubscribedURI).then(() => Linking.openURL(alreadySubscribedURI));
}, [alreadySubscribedURI]);

const onPressInLearnMore = useCallback((e: GestureResponderEvent) => {
Expand Down

0 comments on commit 2474481

Please sign in to comment.