diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-23 04:22:22 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-11-23 04:22:22 +0800 |
commit | f74408f390199b239ce707ef6db3773045c9863d (patch) | |
tree | a87fb0f5312dad68b816c597eeb58d411e97bbcd /packages/0x.js/src/utils/utils.ts | |
parent | f5e0fd8de5a3201ac17a8dde68aec3314674f1c4 (diff) | |
parent | 0e03ef385b03f5b2f916f38001553b1c1c18c383 (diff) | |
download | dexon-sol-tools-f74408f390199b239ce707ef6db3773045c9863d.tar dexon-sol-tools-f74408f390199b239ce707ef6db3773045c9863d.tar.gz dexon-sol-tools-f74408f390199b239ce707ef6db3773045c9863d.tar.bz2 dexon-sol-tools-f74408f390199b239ce707ef6db3773045c9863d.tar.lz dexon-sol-tools-f74408f390199b239ce707ef6db3773045c9863d.tar.xz dexon-sol-tools-f74408f390199b239ce707ef6db3773045c9863d.tar.zst dexon-sol-tools-f74408f390199b239ce707ef6db3773045c9863d.zip |
Merge branch 'development' into addWebsite
* development: (33 commits)
Last renames
Refactor while condition
Fix tests
Fix tests
Fix a typo
Fix test:circleci command
Check if transactionReceipt exists before normalizing it
Address nits
Remove old comment
Fix async callbacks
Check if callback exists
Rename
Pass callback down
Remove custom heap and use bintrees
Add expirationMarginMs
Add defaults
Fix typos
Rename orderLifetime to orderLifetimeS
Reference types directly
Add ifExists suffix
...
Diffstat (limited to 'packages/0x.js/src/utils/utils.ts')
-rw-r--r-- | packages/0x.js/src/utils/utils.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/0x.js/src/utils/utils.ts b/packages/0x.js/src/utils/utils.ts index 280f3e979..5370c3b4b 100644 --- a/packages/0x.js/src/utils/utils.ts +++ b/packages/0x.js/src/utils/utils.ts @@ -49,7 +49,10 @@ export const utils = { const hashHex = ethUtil.bufferToHex(hashBuff); return hashHex; }, - getCurrentUnixTimestamp(): BigNumber { - return new BigNumber(Date.now() / 1000); + getCurrentUnixTimestampSec(): BigNumber { + return new BigNumber(Date.now() / 1000).round(); + }, + getCurrentUnixTimestampMs(): BigNumber { + return new BigNumber(Date.now()); }, }; |