From d39c6f6b618ec1ab1782028fbacd1103fc043dac Mon Sep 17 00:00:00 2001 From: Thomas Brillard Date: Thu, 31 Oct 2024 09:50:15 +0100 Subject: [PATCH] fix: allow tracking to be disabled for swap --- .changeset/mighty-wombats-fix.md | 5 +++++ .../screens/exchange/Swap2/Form/SwapWebViewDemo3.tsx | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/mighty-wombats-fix.md diff --git a/.changeset/mighty-wombats-fix.md b/.changeset/mighty-wombats-fix.md new file mode 100644 index 000000000000..3a96985d497c --- /dev/null +++ b/.changeset/mighty-wombats-fix.md @@ -0,0 +1,5 @@ +--- +"ledger-live-desktop": minor +--- + +fix: allow tracking to be disabled for swap diff --git a/apps/ledger-live-desktop/src/renderer/screens/exchange/Swap2/Form/SwapWebViewDemo3.tsx b/apps/ledger-live-desktop/src/renderer/screens/exchange/Swap2/Form/SwapWebViewDemo3.tsx index 2cc1e2c382f3..4ef48014d2e5 100644 --- a/apps/ledger-live-desktop/src/renderer/screens/exchange/Swap2/Form/SwapWebViewDemo3.tsx +++ b/apps/ledger-live-desktop/src/renderer/screens/exchange/Swap2/Form/SwapWebViewDemo3.tsx @@ -27,6 +27,7 @@ import { developerModeSelector, enablePlatformDevToolsSelector, languageSelector, + shareAnalyticsSelector, } from "~/renderer/reducers/settings"; import { captureException } from "~/sentry/renderer"; import WebviewErrorDrawer from "./WebviewErrorDrawer/index"; @@ -117,6 +118,7 @@ const SwapWebView = ({ manifest, liveAppUnavailable }: SwapWebProps) => { const locale = useSelector(languageSelector); const enablePlatformDevTools = useSelector(enablePlatformDevToolsSelector); const devMode = useSelector(developerModeSelector); + const shareAnalytics = useSelector(shareAnalyticsSelector); const accounts = useSelector(flattenAccountsSelector); const { t } = useTranslation(); const swapDefaultTrack = useGetSwapTrackingProperties(); @@ -463,6 +465,7 @@ const SwapWebView = ({ manifest, liveAppUnavailable }: SwapWebProps) => { currencyTicker: fiatCurrency.ticker, swapApiBase: SWAP_API_BASE, devMode, + shareAnalytics, }} onStateChange={onStateChange} ref={webviewAPIRef}