diff options
author | Fabio Berger <me@fabioberger.com> | 2017-06-01 22:21:09 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-06-01 22:21:09 +0800 |
commit | abd113f61f67b08b9a232a89832b1db4318dac9e (patch) | |
tree | 757df0cc0298508a94b4105fde323cf01ef9d0ea /src/contract_wrappers | |
parent | 44f11442424c88d1130ee398d0714636c5ade045 (diff) | |
parent | 52bdc0d3432ef917cca15522cea78255d03d82f6 (diff) | |
download | dexon-0x-contracts-abd113f61f67b08b9a232a89832b1db4318dac9e.tar dexon-0x-contracts-abd113f61f67b08b9a232a89832b1db4318dac9e.tar.gz dexon-0x-contracts-abd113f61f67b08b9a232a89832b1db4318dac9e.tar.bz2 dexon-0x-contracts-abd113f61f67b08b9a232a89832b1db4318dac9e.tar.lz dexon-0x-contracts-abd113f61f67b08b9a232a89832b1db4318dac9e.tar.xz dexon-0x-contracts-abd113f61f67b08b9a232a89832b1db4318dac9e.tar.zst dexon-0x-contracts-abd113f61f67b08b9a232a89832b1db4318dac9e.zip |
Merge branch 'fillOrderAsync' of github.com:0xProject/0x.js into fillOrderAsync
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index 40f22bd28..ded0d3519 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -125,6 +125,9 @@ export class ExchangeWrapper extends ContractWrapper { if (signedOrder.taker !== constants.NULL_ADDRESS && signedOrder.taker !== senderAddress) { throw new Error(FillOrderValidationErrs.NOT_A_TAKER); } + if (signedOrder.expirationUnixTimestampSec.lessThan(Date.now() / 1000)) { + throw new Error(FillOrderValidationErrs.EXPIRED); + } } private async getExchangeInstanceOrThrowAsync(): Promise<ExchangeContract> { const contractInstance = await this.instantiateContractIfExistsAsync((ExchangeArtifacts as any)); |