aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/schemas
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-01-09 10:02:41 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-01-09 10:02:41 +0800
commit8019b1b8231cac24dfc6aa3bb2d5115eff11ee89 (patch)
treed270d71404bd3aab44c79dcadf16e348614e9214 /packages/website/ts/schemas
parent8fe81c9d090ce50496f3150602f19433e7aedd1e (diff)
parent7a56e83fa3ca02d796deba3359da480834a9f6ea (diff)
downloaddexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar
dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.gz
dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.bz2
dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.lz
dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.xz
dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.zst
dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.zip
Merge branch 'development' into refactor/httpClientJsonParsing
* development: (21 commits) Update connect CHANGELOG Changes to abi-gen after code review Added constructor ABIs to abi-gen Describe #295 in a CHANGELOG Add #302 description to changelog Fix formatting Apply prettier config Install prettier Remove formatting esilnt rules sendTransactionAsync should return txHash string Added Event generation to abi-gen Publish Add dates to CHANGELOG entries Update subproviders CHANGELOG Support both personal_sign and eth_sign Fix Ledger tests given change from `personal_sign` to `eth_sign` Update subprovider to catch correct RPC method Rename guide Update contribution guide Fix broken links in the abi-gen README ...
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;