diff --git a/.changeset/cold-walls-poke.md b/.changeset/cold-walls-poke.md new file mode 100644 index 000000000000..5d752da87212 --- /dev/null +++ b/.changeset/cold-walls-poke.md @@ -0,0 +1,8 @@ +--- +"ledger-live-desktop": minor +"live-mobile": minor +"@ledgerhq/live-common": minor +--- + +- Update WebPTXPlayer to load correct manifest +- Remove unused LL BUY/SELL in favour of BUY/SELL Live App diff --git a/apps/ledger-live-desktop/src/renderer/Default.tsx b/apps/ledger-live-desktop/src/renderer/Default.tsx index 42b8c7ad0ee0..e8734f1b6045 100644 --- a/apps/ledger-live-desktop/src/renderer/Default.tsx +++ b/apps/ledger-live-desktop/src/renderer/Default.tsx @@ -248,7 +248,7 @@ export default function Default() { /> - + { setTrackingSource("Page Portfolio"); history.push({ pathname: "/exchange", - state: ptxSmartRouting?.enabled - ? { - mode: "buy", // buy or sell - } - : undefined, + state: { + mode: "buy", // buy or sell + }, }); - }, [history, ptxSmartRouting]); + }, [history]); const onSwap = useCallback(() => { setTrackingSource("Page Portfolio"); history.push({ diff --git a/apps/ledger-live-desktop/src/renderer/components/BuyButton.tsx b/apps/ledger-live-desktop/src/renderer/components/BuyButton.tsx index c71065eafa33..26818e0cd1f2 100644 --- a/apps/ledger-live-desktop/src/renderer/components/BuyButton.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/BuyButton.tsx @@ -8,34 +8,28 @@ import { Account } from "@ledgerhq/types-live"; import { CryptoCurrency } from "@ledgerhq/types-cryptoassets"; import { setTrackingSource } from "~/renderer/analytics/TrackPage"; import { isCurrencySupported } from "~/renderer/screens/exchange/config"; -import { useFeature } from "@ledgerhq/live-common/featureFlags/index"; + const BuyButton = ({ currency, account }: { currency: CryptoCurrency; account: Account }) => { const history = useHistory(); const dispatch = useDispatch(); - // PTX smart routing feature flag - buy sell live app flag - const ptxSmartRouting = useFeature("ptxSmartRouting"); const onClick = useCallback(() => { dispatch(closeAllModal()); setTrackingSource("send flow"); history.push({ pathname: "/exchange", - state: ptxSmartRouting?.enabled - ? { - currency: currency.id, - account: account.id, - mode: "buy", // buy or sell - } - : { - tab: 0, - defaultCurrency: currency, - defaultAccount: account, - }, + state: { + currency: currency.id, + account: account.id, + mode: "buy", // buy or sell + }, }); - }, [account, currency, dispatch, history, ptxSmartRouting]); + }, [account, currency, dispatch, history]); + if (!isCurrencySupported("BUY", currency)) { return null; } + return (