From d6c3398dd9d723459058d9b9174f6bd724795bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Fri, 6 Dec 2024 17:17:43 +0100 Subject: [PATCH] fix: provide default value to convert (#104) --- src/components/common/BNInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/BNInput.tsx b/src/components/common/BNInput.tsx index 4554c396..ab65310c 100644 --- a/src/components/common/BNInput.tsx +++ b/src/components/common/BNInput.tsx @@ -66,7 +66,7 @@ export function BNInput({ if (value) { const valueAsString = bigIntToString(value, denomination); - const oldValue = stringToBigint(valStr, denomination); + const oldValue = stringToBigint(valStr || '0', denomination); /** * When deleting zeros after decimal, all zeros delete without this check. * This also preserves zeros in the input ui.