Skip to content
Merged
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
3 changes: 3 additions & 0 deletions src/components/Global/TokenAmountInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading