11import { ChainId } from '@/utils/chains'
22import { broom } from '@lucide/lab'
33import { useAtom , useAtomValue } from 'jotai'
4- import { Anvil , Icon , Route , Zap } from 'lucide-react'
4+ import { Anvil , Icon , Route , Search , Zap } from 'lucide-react'
55import {
66 chainIdAtom ,
7+ deepLiquidityAtom ,
78 quoteSourceAtom ,
89 type QuoteSource ,
910} from '../../state/atoms'
@@ -39,6 +40,7 @@ const ZapSettings = () => {
3940 const [ slippage , setSlippage ] = useAtom ( slippageAtom )
4041 const [ forceMint , setForceMint ] = useAtom ( forceMintAtom )
4142 const [ quoteSource , setQuoteSource ] = useAtom ( quoteSourceAtom )
43+ const [ deepLiquidity , setDeepLiquidity ] = useAtom ( deepLiquidityAtom )
4244
4345 const handleSlippageChange = ( value : string ) => {
4446 setSlippage ( value )
@@ -53,6 +55,11 @@ const ZapSettings = () => {
5355 setQuoteSource ( value )
5456 }
5557
58+ const handleDeepLiquidityChange = ( value : boolean | 'indeterminate' ) => {
59+ const newValue = value === 'indeterminate' ? false : value
60+ setDeepLiquidity ( newValue )
61+ }
62+
5663 return (
5764 < div className = "min-h-[306px] border-t border-border -mx-2 px-2 py-4 flex flex-col gap-4" >
5865 < div className = "flex flex-col gap-2" >
@@ -105,6 +112,22 @@ const ZapSettings = () => {
105112 hideTitle
106113 />
107114 </ div >
115+ < div className = "flex flex-col gap-2" >
116+ < ZapSettingsRowTitle
117+ title = "Enable Deep liquidity search?"
118+ help = "Can improve price impact but it will take more time to get quotes."
119+ />
120+ < div className = "rounded-xl border border-border px-3 py-3 flex items-center gap-1 justify-between" >
121+ < div className = "flex items-center gap-1" >
122+ < Search size = { 16 } className = "text-muted-foreground" />
123+ < div > Deep liquidity search</ div >
124+ </ div >
125+ < Checkbox
126+ checked = { deepLiquidity }
127+ onCheckedChange = { handleDeepLiquidityChange }
128+ />
129+ </ div >
130+ </ div >
108131 < div className = "flex flex-col gap-2" >
109132 < ZapSettingsRowTitle
110133 title = "Force DTF mint?"
0 commit comments