@@ -7,8 +7,7 @@ import { useDebounce } from 'use-debounce'
7
7
import { tradeMachineAtom } from '@/app/store/trade-machine'
8
8
import { SmartTradeButton } from '@/components/smart-trade-button'
9
9
import { SwapNavigation } from '@/components/swap/components/navigation'
10
- import { ARBITRUM , BASE , MAINNET } from '@/constants/chains'
11
- import { Token } from '@/constants/tokens'
10
+ import { ARBITRUM , MAINNET } from '@/constants/chains'
12
11
import { useBestQuote } from '@/lib/hooks/use-best-quote'
13
12
import { QuoteType } from '@/lib/hooks/use-best-quote/types'
14
13
import { useDisclosure } from '@/lib/hooks/use-disclosure'
@@ -27,14 +26,16 @@ import { getTokenBySymbol } from '@/lib/utils/tokens'
27
26
import { SelectTokenModal } from './components/select-token-modal'
28
27
import { TradeDetails } from './components/trade-details'
29
28
import {
30
- InputSelectorToken ,
29
+ type InputSelectorToken ,
31
30
TradeInputSelector ,
32
31
} from './components/trade-input-selector'
33
32
import { TradeOutput } from './components/trade-output'
34
33
import { TransactionReviewModal } from './components/transaction-review'
35
34
import { useSwap } from './hooks/use-swap'
36
35
import { useTokenlists } from './hooks/use-tokenlists'
37
36
37
+ import type { Token } from '@/constants/tokens'
38
+
38
39
type SwapProps = {
39
40
isBuying : boolean
40
41
inputToken : Token
@@ -47,7 +48,6 @@ export const Swap = (props: SwapProps) => {
47
48
const isSupportedNetwork = useSupportedNetworks ( [
48
49
MAINNET . chainId ,
49
50
ARBITRUM . chainId ,
50
- BASE . chainId ,
51
51
] )
52
52
const { chainId } = useNetwork ( )
53
53
const { slippage } = useSlippage ( )
@@ -119,6 +119,16 @@ export const Swap = (props: SwapProps) => {
119
119
setSelectedQuote ( quoteResults ?. bestQuote )
120
120
} , [ quoteResults ] )
121
121
122
+ useEffect ( ( ) => {
123
+ const quote = quoteResults ?. results [ selectedQuote ?? QuoteType . index ]
124
+ if ( ! quote ) return
125
+ sendTradeEvent ( {
126
+ type : 'QUOTE' ,
127
+ quoteResult : quote ,
128
+ quoteType : quote . type ,
129
+ } )
130
+ } , [ quoteResults , selectedQuote , sendTradeEvent ] )
131
+
122
132
const resetTradeData = useCallback ( ( ) => {
123
133
setInputTokenAmountFormatted ( '' )
124
134
setSellTokenAmount ( '0' )
0 commit comments