aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/schemas/validator.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-02-08 03:26:13 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-02-08 03:26:13 +0800
commit69f5f5e94627458f4eb41f4150cfa3d140658d09 (patch)
tree233be0fd8343ebd92143103f1ae421ad1aae70f2 /packages/website/ts/schemas/validator.ts
parentae14b0a71d70f057efb9cbd4d180aca76a3ad5d1 (diff)
downloaddexon-sol-tools-69f5f5e94627458f4eb41f4150cfa3d140658d09.tar
dexon-sol-tools-69f5f5e94627458f4eb41f4150cfa3d140658d09.tar.gz
dexon-sol-tools-69f5f5e94627458f4eb41f4150cfa3d140658d09.tar.bz2
dexon-sol-tools-69f5f5e94627458f4eb41f4150cfa3d140658d09.tar.lz
dexon-sol-tools-69f5f5e94627458f4eb41f4150cfa3d140658d09.tar.xz
dexon-sol-tools-69f5f5e94627458f4eb41f4150cfa3d140658d09.tar.zst
dexon-sol-tools-69f5f5e94627458f4eb41f4150cfa3d140658d09.zip
Split Order into signedOrder and metadata
Diffstat (limited to 'packages/website/ts/schemas/validator.ts')
-rw-r--r--packages/website/ts/schemas/validator.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/website/ts/schemas/validator.ts b/packages/website/ts/schemas/validator.ts
index e2ffc7b79..14061e2a3 100644
--- a/packages/website/ts/schemas/validator.ts
+++ b/packages/website/ts/schemas/validator.ts
@@ -1,6 +1,8 @@
import { Schema as JSONSchema, Validator } from 'jsonschema';
+import { orderMetadataSchema } from 'ts/schemas/metadata_schema';
import { orderSchema } from 'ts/schemas/order_schema';
import { signatureDataSchema } from 'ts/schemas/signature_data_schema';
+import { signedOrderSchema } from 'ts/schemas/signed_order_schema';
import { tokenSchema } from 'ts/schemas/token_schema';
export class SchemaValidator {
@@ -9,6 +11,8 @@ export class SchemaValidator {
this._validator = new Validator();
this._validator.addSchema(signatureDataSchema as JSONSchema, signatureDataSchema.id);
this._validator.addSchema(tokenSchema as JSONSchema, tokenSchema.id);
+ this._validator.addSchema(orderMetadataSchema as JSONSchema, orderMetadataSchema.id);
+ this._validator.addSchema(signedOrderSchema as JSONSchema, signedOrderSchema.id);
this._validator.addSchema(orderSchema as JSONSchema, orderSchema.id);
}
public validate(instance: object, schema: Schema) {