1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

fix conversion (#1538)

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
mihaisc 2022-06-29 06:46:12 -07:00 committed by GitHub
parent d4f3e3b254
commit 34c9a39157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}`)
}