Commit e4a9764a authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

fix: increase useBestTrade debounce time (#6631)

* fix: increase useBestTrade debounce time

* reduce

* increase

* 350

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