aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/assert.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-02 00:14:17 +0800
committerFabio Berger <me@fabioberger.com>2017-06-02 00:14:17 +0800
commitacb8a6c55ee2c97db5d738621929feea759465b3 (patch)
tree57cfa925d645cb11bb1731381be56d0f66f8f0f1 /src/utils/assert.ts
parentecf92a4ad786a324d4c8ce9dba926f377766a144 (diff)
parent389c18e98e2b5663b1732d7c34f9b21afef66e44 (diff)
downloaddexon-sol-tools-acb8a6c55ee2c97db5d738621929feea759465b3.tar
dexon-sol-tools-acb8a6c55ee2c97db5d738621929feea759465b3.tar.gz
dexon-sol-tools-acb8a6c55ee2c97db5d738621929feea759465b3.tar.bz2
dexon-sol-tools-acb8a6c55ee2c97db5d738621929feea759465b3.tar.lz
dexon-sol-tools-acb8a6c55ee2c97db5d738621929feea759465b3.tar.xz
dexon-sol-tools-acb8a6c55ee2c97db5d738621929feea759465b3.tar.zst
dexon-sol-tools-acb8a6c55ee2c97db5d738621929feea759465b3.zip
Merge branch 'fillOrderAsync' into unavailableFilledCancelled
# Conflicts: # src/contract_wrappers/exchange_wrapper.ts # src/types.ts # src/utils/assert.ts
Diffstat (limited to 'src/utils/assert.ts')
-rw-r--r--src/utils/assert.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/assert.ts b/src/utils/assert.ts
index 0088b3b13..406f2b149 100644
--- a/src/utils/assert.ts
+++ b/src/utils/assert.ts
@@ -31,6 +31,9 @@ export const assert = {
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 {
const schemaValidator = new SchemaValidator();
const validationResult = schemaValidator.validate(value, schema);