aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/schemas
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/schemas')
-rw-r--r--packages/website/ts/schemas/order_schema.ts12
-rw-r--r--packages/website/ts/schemas/order_taker_schema.ts9
-rw-r--r--packages/website/ts/schemas/token_schema.ts3
-rw-r--r--packages/website/ts/schemas/validator.ts2
4 files changed, 11 insertions, 15 deletions
diff --git a/packages/website/ts/schemas/order_schema.ts b/packages/website/ts/schemas/order_schema.ts
index ccf4af671..6ddc9e445 100644
--- a/packages/website/ts/schemas/order_schema.ts
+++ b/packages/website/ts/schemas/order_schema.ts
@@ -1,8 +1,12 @@
export const orderSchema = {
id: '/Order',
properties: {
- maker: { $ref: '/OrderTaker' },
- taker: { $ref: '/OrderTaker' },
+ maker: { type: 'string' },
+ taker: { type: 'string' },
+ makerTokenAddress: { type: 'string' },
+ takerTokenAddress: { type: 'string' },
+ makerToken: { $ref: '/Token' },
+ takerToken: { $ref: '/Token' },
makerFee: { type: 'string' },
takerFee: { type: 'string' },
makerTokenAmount: { type: 'string' },
@@ -17,6 +21,10 @@ export const orderSchema = {
required: [
'maker',
'taker',
+ 'makerTokenAddress',
+ 'takerTokenAddress',
+ 'makerToken',
+ 'takerToken',
'makerFee',
'takerFee',
'makerTokenAmount',
diff --git a/packages/website/ts/schemas/order_taker_schema.ts b/packages/website/ts/schemas/order_taker_schema.ts
deleted file mode 100644
index bce71f74b..000000000
--- a/packages/website/ts/schemas/order_taker_schema.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export const orderTakerSchema = {
- id: '/OrderTaker',
- properties: {
- address: { type: 'string' },
- token: { $ref: '/Token' },
- },
- required: ['address', 'token'],
- type: 'object',
-};
diff --git a/packages/website/ts/schemas/token_schema.ts b/packages/website/ts/schemas/token_schema.ts
index 92b53a463..34cd6f676 100644
--- a/packages/website/ts/schemas/token_schema.ts
+++ b/packages/website/ts/schemas/token_schema.ts
@@ -4,8 +4,7 @@ export const tokenSchema = {
name: { type: 'string' },
symbol: { type: 'string' },
decimals: { type: 'number' },
- address: { type: 'string' },
},
- required: ['name', 'symbol', 'decimals', 'address'],
+ required: ['name', 'symbol', 'decimals'],
type: 'object',
};
diff --git a/packages/website/ts/schemas/validator.ts b/packages/website/ts/schemas/validator.ts
index 5177501c6..e2ffc7b79 100644
--- a/packages/website/ts/schemas/validator.ts
+++ b/packages/website/ts/schemas/validator.ts
@@ -1,6 +1,5 @@
import { Schema as JSONSchema, Validator } from 'jsonschema';
import { orderSchema } from 'ts/schemas/order_schema';
-import { orderTakerSchema } from 'ts/schemas/order_taker_schema';
import { signatureDataSchema } from 'ts/schemas/signature_data_schema';
import { tokenSchema } from 'ts/schemas/token_schema';
@@ -10,7 +9,6 @@ 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(orderTakerSchema as JSONSchema, orderTakerSchema.id);
this._validator.addSchema(orderSchema as JSONSchema, orderSchema.id);
}
public validate(instance: object, schema: Schema) {