aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-06-02 07:40:38 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-06-02 07:40:38 +0800
commitfb3860757ca882e2b01a71673217a5f543087066 (patch)
treef7c27861b00c055262253e6505c77bc884391518 /packages/contracts
parente4a8b175225108c66778372166e52b7d5a18333f (diff)
downloaddexon-0x-contracts-fb3860757ca882e2b01a71673217a5f543087066.tar.gz
dexon-0x-contracts-fb3860757ca882e2b01a71673217a5f543087066.tar.zst
dexon-0x-contracts-fb3860757ca882e2b01a71673217a5f543087066.zip
Set contract expiration time to a constant 10 minutes
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/src/utils/order_factory.ts3
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,