diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-06-02 07:40:38 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-06-02 07:40:38 +0800 |
commit | fb3860757ca882e2b01a71673217a5f543087066 (patch) | |
tree | f7c27861b00c055262253e6505c77bc884391518 | |
parent | e4a8b175225108c66778372166e52b7d5a18333f (diff) | |
download | dexon-0x-contracts-fb3860757ca882e2b01a71673217a5f543087066.tar dexon-0x-contracts-fb3860757ca882e2b01a71673217a5f543087066.tar.gz dexon-0x-contracts-fb3860757ca882e2b01a71673217a5f543087066.tar.bz2 dexon-0x-contracts-fb3860757ca882e2b01a71673217a5f543087066.tar.lz dexon-0x-contracts-fb3860757ca882e2b01a71673217a5f543087066.tar.xz dexon-0x-contracts-fb3860757ca882e2b01a71673217a5f543087066.tar.zst dexon-0x-contracts-fb3860757ca882e2b01a71673217a5f543087066.zip |
Set contract expiration time to a constant 10 minutes
-rw-r--r-- | packages/contracts/src/utils/order_factory.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/contracts/src/utils/order_factory.ts b/packages/contracts/src/utils/order_factory.ts index f704c26ec..e60f25605 100644 --- a/packages/contracts/src/utils/order_factory.ts +++ b/packages/contracts/src/utils/order_factory.ts @@ -19,7 +19,8 @@ export class OrderFactory { customOrderParams: Partial<UnsignedOrder> = {}, signatureType: SignatureType = SignatureType.Ecrecover, ): SignedOrder { - const randomExpiration = new BigNumber(Math.floor((Date.now() + Math.random() * 100000000000) / 1000)); + const tenMinutes = 10 * 60 * 1000; + const randomExpiration = new BigNumber(Date.now() + tenMinutes); const order = ({ senderAddress: constants.NULL_ADDRESS, expirationTimeSeconds: randomExpiration, |