From f218e6386fbdd9194ae6669b7cff42b5d7bc6560 Mon Sep 17 00:00:00 2001 From: viet-nv Date: Fri, 3 Nov 2023 11:40:57 +0700 Subject: [PATCH] hotfix: crash page when creating pool --- src/state/swap/hooks.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/state/swap/hooks.ts b/src/state/swap/hooks.ts index a4f1dd3306..64b57bbc20 100644 --- a/src/state/swap/hooks.ts +++ b/src/state/swap/hooks.ts @@ -157,6 +157,8 @@ export function tryParseAmount( const typedValueParsed = parseFraction(value) .multiply(scaleDecimals ? 10 ** currency.decimals : 1) .toFixed(0) + + if (typedValueParsed === '0') return undefined const result = CurrencyAmount.fromRawAmount(currency, typedValueParsed) return result } catch (error) {