diff --git a/src/widgets/swap-form/ui/SwapCard.tsx b/src/widgets/swap-form/ui/SwapCard.tsx index a4b8e88..2aeec0b 100644 --- a/src/widgets/swap-form/ui/SwapCard.tsx +++ b/src/widgets/swap-form/ui/SwapCard.tsx @@ -79,7 +79,10 @@ export function SwapCard({ className={styles.input} type="text" value={amount} - onChange={e => onAmountChange?.(e.target.value)} + onChange={e => { + const v = e.target.value + if (/^(\d+\.?\d*|\.?\d*)$/.test(v) || v === '') onAmountChange?.(v) + }} placeholder="0" /> ) : (