aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-08-22 08:07:14 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-08-23 06:39:03 +0800
commit67d33ec10c3d2467d2d073d22bfe2957353a0cc8 (patch)
treef92c7fdfa478c54b8bcf845e08f1027365ba89c8 /packages/order-utils/src
parent05ba049f5937be3a3a47ed90898f6a0267a67fd8 (diff)
downloaddexon-sol-tools-67d33ec10c3d2467d2d073d22bfe2957353a0cc8.tar
dexon-sol-tools-67d33ec10c3d2467d2d073d22bfe2957353a0cc8.tar.gz
dexon-sol-tools-67d33ec10c3d2467d2d073d22bfe2957353a0cc8.tar.bz2
dexon-sol-tools-67d33ec10c3d2467d2d073d22bfe2957353a0cc8.tar.lz
dexon-sol-tools-67d33ec10c3d2467d2d073d22bfe2957353a0cc8.tar.xz
dexon-sol-tools-67d33ec10c3d2467d2d073d22bfe2957353a0cc8.tar.zst
dexon-sol-tools-67d33ec10c3d2467d2d073d22bfe2957353a0cc8.zip
Fix rounding bug in marketUtils
Diffstat (limited to 'packages/order-utils/src')
-rw-r--r--packages/order-utils/src/market_utils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/order-utils/src/market_utils.ts b/packages/order-utils/src/market_utils.ts
index 7eae4c8fc..b31a2b135 100644
--- a/packages/order-utils/src/market_utils.ts
+++ b/packages/order-utils/src/market_utils.ts
@@ -123,7 +123,7 @@ export const marketUtils = {
const makerAssetAmountAvailable = remainingFillableMakerAssetAmounts[index];
const feeToFillMakerAssetAmountAvailable = makerAssetAmountAvailable
.mul(order.takerFee)
- .div(order.makerAssetAmount);
+ .dividedToIntegerBy(order.makerAssetAmount);
return accFees.plus(feeToFillMakerAssetAmountAvailable);
},
constants.ZERO_AMOUNT,