From ca02a6b56a555055e00f7a698ca87cc1f4d18c30 Mon Sep 17 00:00:00 2001
From: eddie <66155195+just-toby@users.noreply.github.com>
Date: Mon, 17 Jul 2023 10:06:42 -0700
Subject: [PATCH] fix: log opt in impression (#6959)
* fix: log opt in impression
* fix: move trace up to parent level
---
src/pages/Swap/UniswapXOptIn.tsx | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/src/pages/Swap/UniswapXOptIn.tsx b/src/pages/Swap/UniswapXOptIn.tsx
index 10f61222cb..a8b99238d5 100644
--- a/src/pages/Swap/UniswapXOptIn.tsx
+++ b/src/pages/Swap/UniswapXOptIn.tsx
@@ -30,6 +30,7 @@ import { ThemedText } from 'theme'
export const UniswapXOptIn = (props: { swapInfo: SwapInfo; isSmall: boolean }) => {
const {
trade: { trade },
+ allowedSlippage,
} = props.swapInfo
const userDisabledUniswapX = useUserDisabledUniswapX()
const isOnClassic = Boolean(trade && isClassicTrade(trade) && trade.isUniswapXBetter && !userDisabledUniswapX)
@@ -44,7 +45,15 @@ export const UniswapXOptIn = (props: { swapInfo: SwapInfo; isSmall: boolean }) =
return null
}
- return
+ return (
+
+
+
+ )
}
const OptInContents = ({
@@ -111,20 +120,8 @@ const OptInContents = ({
const containerRef = useRef()
- const wrapTrace = (children: JSX.Element) => {
- return (
-
- {children}
-
- )
- }
-
if (isSmall) {
- return wrapTrace(
+ return (
@@ -143,7 +140,7 @@ const OptInContents = ({
)
}
- return wrapTrace(
+ return (
<>
{/* first popover: intro */}