diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-07 18:20:28 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-07 18:20:28 +0800 |
commit | 09f67322f1548b77ea3835b8a885e8c538835af8 (patch) | |
tree | 54db087854438cc7b55cbb9bd8f27bbf0c56a0df /src/0x.js.ts | |
parent | 9a2a79a947eeb9f839a381d1ee27cad872636438 (diff) | |
download | dexon-0x-contracts-09f67322f1548b77ea3835b8a885e8c538835af8.tar dexon-0x-contracts-09f67322f1548b77ea3835b8a885e8c538835af8.tar.gz dexon-0x-contracts-09f67322f1548b77ea3835b8a885e8c538835af8.tar.bz2 dexon-0x-contracts-09f67322f1548b77ea3835b8a885e8c538835af8.tar.lz dexon-0x-contracts-09f67322f1548b77ea3835b8a885e8c538835af8.tar.xz dexon-0x-contracts-09f67322f1548b77ea3835b8a885e8c538835af8.tar.zst dexon-0x-contracts-09f67322f1548b77ea3835b8a885e8c538835af8.zip |
Remove assertions from utils methods
Diffstat (limited to 'src/0x.js.ts')
-rw-r--r-- | src/0x.js.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/0x.js.ts b/src/0x.js.ts index fa52d4ad8..7b53b70ea 100644 --- a/src/0x.js.ts +++ b/src/0x.js.ts @@ -16,6 +16,8 @@ import {ecSignatureSchema} from './schemas/ec_signature_schema'; import {TokenWrapper} from './contract_wrappers/token_wrapper'; import {ECSignature, ZeroExError, Order, SignedOrder} from './types'; import * as ExchangeArtifacts from './artifacts/Exchange.json'; +import {SchemaValidator} from './utils/schema_validator'; +import {orderSchema} from './schemas/order_schemas'; // Customize our BigNumber instances bigNumberConfigs.configure(); @@ -128,6 +130,8 @@ export class ZeroEx { * Computes the orderHash for a given order and returns it as a hex encoded string. */ public async getOrderHashHexAsync(order: Order|SignedOrder): Promise<string> { + assert.doesConformToSchema( + 'order', SchemaValidator.convertToJSONSchemaCompatibleObject(order as object), orderSchema); const exchangeContractAddr = await this.getExchangeAddressAsync(); const hashHex = utils.getOrderHashHex(order, exchangeContractAddr); return hashHex; |