diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-07-05 01:27:31 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-07-05 01:27:31 +0800 |
commit | b1c7291d3cfffb11a13c50a518f2b895bcdc9fc5 (patch) | |
tree | 72fe9bb7fc42e4dc3ec6c55483d7acb1406da8eb /src/utils/assert.ts | |
parent | 5611df82f9f276fb161fa268f7ab468a6c1d7784 (diff) | |
download | dexon-0x-contracts-b1c7291d3cfffb11a13c50a518f2b895bcdc9fc5.tar.gz dexon-0x-contracts-b1c7291d3cfffb11a13c50a518f2b895bcdc9fc5.tar.zst dexon-0x-contracts-b1c7291d3cfffb11a13c50a518f2b895bcdc9fc5.zip |
Use orderHashSchema to validate order hash
Diffstat (limited to 'src/utils/assert.ts')
-rw-r--r-- | src/utils/assert.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/utils/assert.ts b/src/utils/assert.ts index 38c1d4aae..ec3790870 100644 --- a/src/utils/assert.ts +++ b/src/utils/assert.ts @@ -45,13 +45,10 @@ export const assert = { isNumber(variableName: string, value: number): void { this.assert(_.isFinite(value), this.typeAssertionMessage(variableName, 'number', value)); }, - isValidOrderHash(variableName: string, value: string): void { - this.assert(utils.isValidOrderHash(value), this.typeAssertionMessage(variableName, 'orderHash', value)); - }, isBoolean(variableName: string, value: boolean): void { this.assert(_.isBoolean(value), this.typeAssertionMessage(variableName, 'boolean', value)); }, - doesConformToSchema(variableName: string, value: object, schema: Schema): void { + doesConformToSchema(variableName: string, value: any, schema: Schema): void { const schemaValidator = new SchemaValidator(); const validationResult = schemaValidator.validate(value, schema); const hasValidationErrors = validationResult.errors.length > 0; |