aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/schemas
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-22 22:05:32 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-03 18:37:38 +0800
commite744e4cd989bd3ae1070c59f7baa8097f18b8b06 (patch)
treea7fde03873f3c1b8689d3991edbb362f8022e5f0 /packages/website/ts/schemas
parent9a96e8c704b6f84e00bbe848159a4819844cf09d (diff)
downloaddexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.gz
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.bz2
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.lz
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.xz
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.tar.zst
dexon-sol-tools-e744e4cd989bd3ae1070c59f7baa8097f18b8b06.zip
Apply prettier config
Diffstat (limited to 'packages/website/ts/schemas')
-rw-r--r--packages/website/ts/schemas/order_schema.ts27
-rw-r--r--packages/website/ts/schemas/order_taker_schema.ts8
-rw-r--r--packages/website/ts/schemas/signature_data_schema.ts8
-rw-r--r--packages/website/ts/schemas/token_schema.ts8
-rw-r--r--packages/website/ts/schemas/validator.ts10
5 files changed, 26 insertions, 35 deletions
diff --git a/packages/website/ts/schemas/order_schema.ts b/packages/website/ts/schemas/order_schema.ts
index 61b93d273..bfbf9eb8b 100644
--- a/packages/website/ts/schemas/order_schema.ts
+++ b/packages/website/ts/schemas/order_schema.ts
@@ -1,24 +1,15 @@
export const orderSchema = {
id: '/Order',
properties: {
- maker: {$ref: '/OrderTaker'},
- taker: {$ref: '/OrderTaker'},
- salt: {type: 'string'},
- signature: {$ref: '/SignatureData'},
- expiration: {type: 'string'},
- feeRecipient: {type: 'string'},
- exchangeContract: {type: 'string'},
- networkId: {type: 'number'},
+ maker: { $ref: '/OrderTaker' },
+ taker: { $ref: '/OrderTaker' },
+ salt: { type: 'string' },
+ signature: { $ref: '/SignatureData' },
+ expiration: { type: 'string' },
+ feeRecipient: { type: 'string' },
+ exchangeContract: { type: 'string' },
+ networkId: { type: 'number' },
},
- required: [
- 'maker',
- 'taker',
- 'salt',
- 'signature',
- 'expiration',
- 'feeRecipient',
- 'exchangeContract',
- 'networkId',
- ],
+ required: ['maker', 'taker', 'salt', 'signature', 'expiration', 'feeRecipient', 'exchangeContract', 'networkId'],
type: 'object',
};
diff --git a/packages/website/ts/schemas/order_taker_schema.ts b/packages/website/ts/schemas/order_taker_schema.ts
index 6b484a60d..c784c29c5 100644
--- a/packages/website/ts/schemas/order_taker_schema.ts
+++ b/packages/website/ts/schemas/order_taker_schema.ts
@@ -1,10 +1,10 @@
export const orderTakerSchema = {
id: '/OrderTaker',
properties: {
- address: {type: 'string'},
- token: {$ref: '/Token'},
- amount: {type: 'string'},
- feeAmount: {type: 'string'},
+ address: { type: 'string' },
+ token: { $ref: '/Token' },
+ amount: { type: 'string' },
+ feeAmount: { type: 'string' },
},
required: ['address', 'token', 'amount', 'feeAmount'],
type: 'object',
diff --git a/packages/website/ts/schemas/signature_data_schema.ts b/packages/website/ts/schemas/signature_data_schema.ts
index d208cc438..8d3f15926 100644
--- a/packages/website/ts/schemas/signature_data_schema.ts
+++ b/packages/website/ts/schemas/signature_data_schema.ts
@@ -1,10 +1,10 @@
export const signatureDataSchema = {
id: '/SignatureData',
properties: {
- hash: {type: 'string'},
- r: {type: 'string'},
- s: {type: 'string'},
- v: {type: 'number'},
+ hash: { type: 'string' },
+ r: { type: 'string' },
+ s: { type: 'string' },
+ v: { type: 'number' },
},
required: ['hash', 'r', 's', 'v'],
type: 'object',
diff --git a/packages/website/ts/schemas/token_schema.ts b/packages/website/ts/schemas/token_schema.ts
index c15f57429..92b53a463 100644
--- a/packages/website/ts/schemas/token_schema.ts
+++ b/packages/website/ts/schemas/token_schema.ts
@@ -1,10 +1,10 @@
export const tokenSchema = {
id: '/Token',
properties: {
- name: {type: 'string'},
- symbol: {type: 'string'},
- decimals: {type: 'number'},
- address: {type: 'string'},
+ name: { type: 'string' },
+ symbol: { type: 'string' },
+ decimals: { type: 'number' },
+ address: { type: 'string' },
},
required: ['name', 'symbol', 'decimals', 'address'],
type: 'object',
diff --git a/packages/website/ts/schemas/validator.ts b/packages/website/ts/schemas/validator.ts
index 832b093e5..5177501c6 100644
--- a/packages/website/ts/schemas/validator.ts
+++ b/packages/website/ts/schemas/validator.ts
@@ -1,8 +1,8 @@
-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';
+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';
export class SchemaValidator {
private _validator: Validator;