Commit 13d0b70f authored by eddie's avatar eddie Committed by GitHub

fix: remove "Received Swap Quote" field from Connect Wallet event (#6316)

parent b852e4e6
...@@ -9,12 +9,10 @@ import PrefetchBalancesWrapper from 'components/WalletDropdown/PrefetchBalancesW ...@@ -9,12 +9,10 @@ import PrefetchBalancesWrapper from 'components/WalletDropdown/PrefetchBalancesW
import { useGetConnection } from 'connection' import { useGetConnection } from 'connection'
import { Portal } from 'nft/components/common/Portal' import { Portal } from 'nft/components/common/Portal'
import { useIsNftClaimAvailable } from 'nft/hooks/useIsNftClaimAvailable' import { useIsNftClaimAvailable } from 'nft/hooks/useIsNftClaimAvailable'
import { getIsValidSwapQuote } from 'pages/Swap'
import { darken } from 'polished' import { darken } from 'polished'
import { useCallback, useMemo } from 'react' import { useCallback, useMemo } from 'react'
import { AlertTriangle } from 'react-feather' import { AlertTriangle } from 'react-feather'
import { useAppSelector } from 'state/hooks' import { useAppSelector } from 'state/hooks'
import { useDerivedSwapInfo } from 'state/swap/hooks'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { colors } from 'theme/colors' import { colors } from 'theme/colors'
import { flexRowNoWrap } from 'theme/styles' import { flexRowNoWrap } from 'theme/styles'
...@@ -153,11 +151,6 @@ function Web3StatusInner() { ...@@ -153,11 +151,6 @@ function Web3StatusInner() {
const { account, connector, chainId, ENSName } = useWeb3React() const { account, connector, chainId, ENSName } = useWeb3React()
const getConnection = useGetConnection() const getConnection = useGetConnection()
const connection = getConnection(connector) const connection = getConnection(connector)
const {
trade: { state: tradeState, trade },
inputError: swapInputError,
} = useDerivedSwapInfo()
const validSwapQuote = getIsValidSwapQuote(trade, tradeState, swapInputError)
const [, toggleWalletDrawer] = useWalletDrawer() const [, toggleWalletDrawer] = useWalletDrawer()
const handleWalletDropdownClick = useCallback(() => { const handleWalletDropdownClick = useCallback(() => {
sendAnalyticsEvent(InterfaceEventName.ACCOUNT_DROPDOWN_BUTTON_CLICKED) sendAnalyticsEvent(InterfaceEventName.ACCOUNT_DROPDOWN_BUTTON_CLICKED)
...@@ -223,7 +216,6 @@ function Web3StatusInner() { ...@@ -223,7 +216,6 @@ function Web3StatusInner() {
<TraceEvent <TraceEvent
events={[BrowserEvent.onClick]} events={[BrowserEvent.onClick]}
name={InterfaceEventName.CONNECT_WALLET_BUTTON_CLICKED} name={InterfaceEventName.CONNECT_WALLET_BUTTON_CLICKED}
properties={{ received_swap_quote: validSwapQuote }}
element={InterfaceElementName.CONNECT_WALLET_BUTTON} element={InterfaceElementName.CONNECT_WALLET_BUTTON}
> >
<Web3StatusConnectWrapper <Web3StatusConnectWrapper
......
...@@ -127,7 +127,7 @@ const DetailsSwapSection = styled(SwapSection)` ...@@ -127,7 +127,7 @@ const DetailsSwapSection = styled(SwapSection)`
border-top-right-radius: 0; border-top-right-radius: 0;
` `
export function getIsValidSwapQuote( function getIsValidSwapQuote(
trade: InterfaceTrade<Currency, Currency, TradeType> | undefined, trade: InterfaceTrade<Currency, Currency, TradeType> | undefined,
tradeState: TradeState, tradeState: TradeState,
swapInputError?: ReactNode swapInputError?: ReactNode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment