aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/order-utils/src/utils.ts')
-rw-r--r--packages/order-utils/src/utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/order-utils/src/utils.ts b/packages/order-utils/src/utils.ts
index 6b2261001..64195dbed 100644
--- a/packages/order-utils/src/utils.ts
+++ b/packages/order-utils/src/utils.ts
@@ -10,13 +10,13 @@ export const utils = {
},
getCurrentUnixTimestampSec(): BigNumber {
const milisecondsInSecond = 1000;
- return new BigNumber(Date.now() / milisecondsInSecond).round();
+ return new BigNumber(Date.now() / milisecondsInSecond).integerValue();
},
getPartialAmountFloor(numerator: BigNumber, denominator: BigNumber, target: BigNumber): BigNumber {
const fillMakerTokenAmount = numerator
- .mul(target)
+ .multipliedBy(target)
.div(denominator)
- .round(0);
+ .integerValue(0);
return fillMakerTokenAmount;
},
};