Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hooks/use-barter-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { fetchBarterRoute } from "@/lib/barter-api"
import { ZERO_ADDRESS, WETH_ADDRESS } from "@/lib/swap-constants"
import type { Token } from "@/types/swap"

const DEBOUNCE_MS = 1500
const DEBOUNCE_MS = 300
const MAX_SLIPPAGE_PCT = 2.0

interface UseBarterValidationParams {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/use-swap-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export function useSwapForm(allTokens: Token[]) {
// --- Minimum "Calculating..." display time ---
// The combined validating signal (quote loading OR barter validating) must stay true
// for at least 1.5s to prevent the swap button text from flickering.
const MIN_VALIDATING_DISPLAY_MS = 1500
const MIN_VALIDATING_DISPLAY_MS = 500
const rawValidating = isBarterValidating || (isQuoteLoading && !isWrapUnwrap)
const [debouncedValidating, setDebouncedValidating] = useState(false)
const validatingSinceRef = useRef<number>(0)
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/use-swap-quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ export function useQuote({
amountIn,
slippage,
enabled = true,
debounceMs = 500,
debounceMs = 300,
tradeType = "exactIn",
tokenList = [],
}: UseQuoteProps): UseQuoteReturn {
Expand Down
Loading