diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-06 04:40:26 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-06 04:40:26 +0800 |
commit | 405234133b784bf563a4220cc6380d25c901e453 (patch) | |
tree | 7de8bfdd2eb7d385845deaac2adc9cdca2dc81e8 /packages/asset-buyer/src/utils | |
parent | 119f8c94495a15ef43298a77abc87fb9d33b4bb3 (diff) | |
download | dexon-sol-tools-405234133b784bf563a4220cc6380d25c901e453.tar dexon-sol-tools-405234133b784bf563a4220cc6380d25c901e453.tar.gz dexon-sol-tools-405234133b784bf563a4220cc6380d25c901e453.tar.bz2 dexon-sol-tools-405234133b784bf563a4220cc6380d25c901e453.tar.lz dexon-sol-tools-405234133b784bf563a4220cc6380d25c901e453.tar.xz dexon-sol-tools-405234133b784bf563a4220cc6380d25c901e453.tar.zst dexon-sol-tools-405234133b784bf563a4220cc6380d25c901e453.zip |
Fix order expiration calc bug and expose gas options to executeBuyQuote
Diffstat (limited to 'packages/asset-buyer/src/utils')
-rw-r--r-- | packages/asset-buyer/src/utils/order_utils.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/asset-buyer/src/utils/order_utils.ts b/packages/asset-buyer/src/utils/order_utils.ts index 62166eb76..cfc13a8a1 100644 --- a/packages/asset-buyer/src/utils/order_utils.ts +++ b/packages/asset-buyer/src/utils/order_utils.ts @@ -10,7 +10,7 @@ export const orderUtils = { willOrderExpire(order: SignedOrder, secondsFromNow: number): boolean { const millisecondsInSecond = 1000; const currentUnixTimestampSec = new BigNumber(Date.now() / millisecondsInSecond).round(); - return order.expirationTimeSeconds.lessThan(currentUnixTimestampSec.minus(secondsFromNow)); + return order.expirationTimeSeconds.lessThan(currentUnixTimestampSec.plus(secondsFromNow)); }, calculateRemainingMakerAssetAmount(order: SignedOrder, remainingTakerAssetAmount: BigNumber): BigNumber { if (remainingTakerAssetAmount.eq(0)) { |