From 35b3c2c72e4252dcec33430e27608187d1270a9c Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Mon, 10 Jun 2024 10:27:12 -0400 Subject: [PATCH] Update src/__swaps__/screens/Swap/hooks/useSwapInputsController.ts Co-authored-by: gregs --- src/__swaps__/screens/Swap/hooks/useSwapInputsController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__swaps__/screens/Swap/hooks/useSwapInputsController.ts b/src/__swaps__/screens/Swap/hooks/useSwapInputsController.ts index 53177d6564d..cfb9daead9d 100644 --- a/src/__swaps__/screens/Swap/hooks/useSwapInputsController.ts +++ b/src/__swaps__/screens/Swap/hooks/useSwapInputsController.ts @@ -32,7 +32,7 @@ import { queryClient } from '@/react-query'; import { divWorklet, equalWorklet, greaterThanWorklet, mulWorklet, toFixedWorklet } from '@/__swaps__/safe-math/SafeMath'; function getInitialInputValues(initialSelectedInputAsset: ExtendedAnimatedAssetWithColors | null) { - const initialBalance = initialSelectedInputAsset ? Number(initialSelectedInputAsset?.balance.amount) : 0; + const initialBalance = Number(initialSelectedInputAsset?.balance.amount) || 0; const initialNiceIncrement = findNiceIncrement(initialBalance); const initialDecimalPlaces = countDecimalPlaces(initialNiceIncrement);