diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-12 06:14:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-12 06:14:19 +0800 |
commit | bc0ae6be318a15bf8670a6da9a59d9bdb12cadae (patch) | |
tree | d4d2ffbac9270c332b1e788c2ac39829a5e89359 /packages/order-utils/src/utils.ts | |
parent | e0c0584c593e3d948652c1cb58f39042c5b8f488 (diff) | |
parent | c03119d10ad0f2633a78980bd939c65fedfd0531 (diff) | |
download | dexon-sol-tools-bc0ae6be318a15bf8670a6da9a59d9bdb12cadae.tar dexon-sol-tools-bc0ae6be318a15bf8670a6da9a59d9bdb12cadae.tar.gz dexon-sol-tools-bc0ae6be318a15bf8670a6da9a59d9bdb12cadae.tar.bz2 dexon-sol-tools-bc0ae6be318a15bf8670a6da9a59d9bdb12cadae.tar.lz dexon-sol-tools-bc0ae6be318a15bf8670a6da9a59d9bdb12cadae.tar.xz dexon-sol-tools-bc0ae6be318a15bf8670a6da9a59d9bdb12cadae.tar.zst dexon-sol-tools-bc0ae6be318a15bf8670a6da9a59d9bdb12cadae.zip |
Merge pull request #684 from 0xProject/fix/contract-wrappers/exchangeTransferSimulator
Move ExchangeTransferSimulator & OrderValidationUtils to Order-Utils
Diffstat (limited to 'packages/order-utils/src/utils.ts')
-rw-r--r-- | packages/order-utils/src/utils.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/order-utils/src/utils.ts b/packages/order-utils/src/utils.ts index 3b465cece..6149316f6 100644 --- a/packages/order-utils/src/utils.ts +++ b/packages/order-utils/src/utils.ts @@ -1,3 +1,5 @@ +import { BigNumber } from '@0xproject/utils'; + export const utils = { getSignatureTypeIndexIfExists(signature: string): number { // tslint:disable-next-line:custom-no-magic-numbers @@ -6,4 +8,8 @@ export const utils = { const signatureTypeInt = parseInt(signatureTypeHex, base); return signatureTypeInt; }, + getCurrentUnixTimestampSec(): BigNumber { + const milisecondsInSecond = 1000; + return new BigNumber(Date.now() / milisecondsInSecond).round(); + }, }; |