From 34c9a3915709a82c87888dfa17f47c20b3e1c3fc Mon Sep 17 00:00:00 2001 From: mihaisc Date: Wed, 29 Jun 2022 06:46:12 -0700 Subject: [PATCH] fix conversion (#1538) Signed-off-by: mihaisc --- src/utils/ContractUtils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/ContractUtils.ts b/src/utils/ContractUtils.ts index e4bb3c0d..e0b54101 100644 --- a/src/utils/ContractUtils.ts +++ b/src/utils/ContractUtils.ts @@ -172,8 +172,7 @@ export async function amountToUnits( const amountFormatted = new BigNumber(amount).times( new BigNumber(10).exponentiatedBy(decimals) ) - - return amountFormatted.toString() + return amountFormatted.toFixed(0) } catch (e) { LoggerInstance.error(`ERROR: FAILED TO CALL DECIMALS(), USING 18', ${e.message}`) }