diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-14 22:53:43 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-15 23:25:25 +0800 |
commit | eb393f0a6643183c784914bf3e039d1f4299247d (patch) | |
tree | dbc37d33b4538d3468479ad9be9354a7c204e4d6 /packages/instant/src/util/asset.ts | |
parent | c3afc13dd660348e99b727c2dd01930eec8d99c3 (diff) | |
download | dexon-0x-contracts-eb393f0a6643183c784914bf3e039d1f4299247d.tar dexon-0x-contracts-eb393f0a6643183c784914bf3e039d1f4299247d.tar.gz dexon-0x-contracts-eb393f0a6643183c784914bf3e039d1f4299247d.tar.bz2 dexon-0x-contracts-eb393f0a6643183c784914bf3e039d1f4299247d.tar.lz dexon-0x-contracts-eb393f0a6643183c784914bf3e039d1f4299247d.tar.xz dexon-0x-contracts-eb393f0a6643183c784914bf3e039d1f4299247d.tar.zst dexon-0x-contracts-eb393f0a6643183c784914bf3e039d1f4299247d.zip |
Upgrade chai-bignumber
Diffstat (limited to 'packages/instant/src/util/asset.ts')
-rw-r--r-- | packages/instant/src/util/asset.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/instant/src/util/asset.ts b/packages/instant/src/util/asset.ts index a6fd77d5a..9e509edf9 100644 --- a/packages/instant/src/util/asset.ts +++ b/packages/instant/src/util/asset.ts @@ -121,7 +121,10 @@ export const assetUtils = { error.amountAvailableToFill, asset.metaData.decimals, ); - const roundedUnitAmountAvailableToFill = unitAmountAvailableToFill.integerValue(2, BigNumber.ROUND_DOWN); + const roundedUnitAmountAvailableToFill = unitAmountAvailableToFill.decimalPlaces( + 2, + BigNumber.ROUND_DOWN, + ); if (roundedUnitAmountAvailableToFill.isGreaterThan(BIG_NUMBER_ZERO)) { return `There are only ${roundedUnitAmountAvailableToFill} ${assetName} available to buy`; |