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 19:26:13 +0800 |
commit | 8c44b102fc48a4ba8a662be3b603ce2af0e8acf6 (patch) | |
tree | c6aa3b3a811ea3d07491c79c6540c90d1475e91c /src/0x.js.ts | |
parent | 65beef5b9cf3a859ec2d24a7b68d02e6d8425fba (diff) | |
download | dexon-sol-tools-8c44b102fc48a4ba8a662be3b603ce2af0e8acf6.tar dexon-sol-tools-8c44b102fc48a4ba8a662be3b603ce2af0e8acf6.tar.gz dexon-sol-tools-8c44b102fc48a4ba8a662be3b603ce2af0e8acf6.tar.bz2 dexon-sol-tools-8c44b102fc48a4ba8a662be3b603ce2af0e8acf6.tar.lz dexon-sol-tools-8c44b102fc48a4ba8a662be3b603ce2af0e8acf6.tar.xz dexon-sol-tools-8c44b102fc48a4ba8a662be3b603ce2af0e8acf6.tar.zst dexon-sol-tools-8c44b102fc48a4ba8a662be3b603ce2af0e8acf6.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; |