From 827ed0c353961362b952f1c6fa78261e74b5cb08 Mon Sep 17 00:00:00 2001 From: Zishan Mohd Date: Fri, 7 Nov 2025 22:34:27 +0530 Subject: [PATCH] Fix: TokenAmountInput having 0.00 default value --- src/components/Global/TokenAmountInput/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/Global/TokenAmountInput/index.tsx b/src/components/Global/TokenAmountInput/index.tsx index da90212d7..341de9c62 100644 --- a/src/components/Global/TokenAmountInput/index.tsx +++ b/src/components/Global/TokenAmountInput/index.tsx @@ -195,6 +195,9 @@ const TokenAmountInput = ({ // to change when we change the display mode or the value (we already call // onchange on the input change so dont add those dependencies here!) useEffect(() => { + // early return if tokenValue is empty. + if (!tokenValue) return + if (!isInitialInputUsd) { const value = tokenValue ? Number(tokenValue) : 0 const formattedValue = (value * (currency?.price ?? 1)).toFixed(2)