fix: increase useBestTrade debounce time (#6631)

* fix: increase useBestTrade debounce time

* reduce

* increase

* 350

* fix
This commit is contained in:
Vignesh Mohankumar 2023-05-24 14:44:18 -04:00 committed by GitHub
parent 303fa15240
commit e4a9764a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,6 +11,9 @@ import { useClientSideV3Trade } from './useClientSideV3Trade'
import useDebounce from './useDebounce'
import useIsWindowVisible from './useIsWindowVisible'
// Prevents excessive quote requests between keystrokes.
const DEBOUNCE_TIME = 350
/**
* Returns the best v2+v3 trade for a desired swap.
* @param tradeType whether the swap is an exact in/out
@ -31,7 +34,7 @@ export function useBestTrade(
const [debouncedAmount, debouncedOtherCurrency] = useDebounce(
useMemo(() => [amountSpecified, otherCurrency], [amountSpecified, otherCurrency]),
200
DEBOUNCE_TIME
)
const isAWrapTransaction = useMemo(() => {