aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-07-05 08:33:35 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-07-05 08:33:35 +0800
commit464c16be73bddce1ed675f642937b164f7add9d8 (patch)
tree4abf982c659ce8e51d561812dc30091ae37f6d88
parent4d522db4747004ffd6471fdacaa61494267a66a8 (diff)
downloaddexon-sol-tools-464c16be73bddce1ed675f642937b164f7add9d8.tar
dexon-sol-tools-464c16be73bddce1ed675f642937b164f7add9d8.tar.gz
dexon-sol-tools-464c16be73bddce1ed675f642937b164f7add9d8.tar.bz2
dexon-sol-tools-464c16be73bddce1ed675f642937b164f7add9d8.tar.lz
dexon-sol-tools-464c16be73bddce1ed675f642937b164f7add9d8.tar.xz
dexon-sol-tools-464c16be73bddce1ed675f642937b164f7add9d8.tar.zst
dexon-sol-tools-464c16be73bddce1ed675f642937b164f7add9d8.zip
move order hash schema to a separate file
-rw-r--r--src/0x.ts3
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts3
-rw-r--r--src/schemas/order_schemas.ts6
-rw-r--r--src/utils/schema_validator.ts3
-rw-r--r--test/schema_test.ts3
5 files changed, 8 insertions, 10 deletions
diff --git a/src/0x.ts b/src/0x.ts
index d790ca38e..49bd31f2d 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -17,7 +17,8 @@ import {ecSignatureSchema} from './schemas/ec_signature_schema';
import {TokenWrapper} from './contract_wrappers/token_wrapper';
import {ProxyWrapper} from './contract_wrappers/proxy_wrapper';
import {ECSignature, ZeroExError, Order, SignedOrder, Web3Provider} from './types';
-import {orderSchema, orderHashSchema} from './schemas/order_schemas';
+import {orderHashSchema} from './schemas/order_hash_schema';
+import {orderSchema} from './schemas/order_schemas';
import {SchemaValidator} from './utils/schema_validator';
// Customize our BigNumber instances
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 72f00ee91..5a2da4a98 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -45,7 +45,8 @@ import {indexFilterValuesSchema} from '../schemas/index_filter_values_schema';
import {orderFillRequestsSchema} from '../schemas/order_fill_requests_schema';
import {orderCancellationRequestsSchema} from '../schemas/order_cancel_schema';
import {orderFillOrKillRequestsSchema} from '../schemas/order_fill_or_kill_requests_schema';
-import {signedOrderSchema, orderSchema, orderHashSchema} from '../schemas/order_schemas';
+import {orderHashSchema} from '../schemas/order_hash_schema';
+import {signedOrderSchema, orderSchema} from '../schemas/order_schemas';
import {constants} from '../utils/constants';
import {TokenWrapper} from './token_wrapper';
import {decorators} from '../utils/decorators';
diff --git a/src/schemas/order_schemas.ts b/src/schemas/order_schemas.ts
index b5e4a72bb..c346687b5 100644
--- a/src/schemas/order_schemas.ts
+++ b/src/schemas/order_schemas.ts
@@ -25,12 +25,6 @@ export const orderSchema = {
type: 'object',
};
-export const orderHashSchema = {
- id: '/orderHashSchema',
- type: 'string',
- pattern: '^0x[0-9a-fA-F]{64}$',
-};
-
export const signedOrderSchema = {
id: '/signedOrderSchema',
allOf: [
diff --git a/src/utils/schema_validator.ts b/src/utils/schema_validator.ts
index 20c160068..58450ff20 100644
--- a/src/utils/schema_validator.ts
+++ b/src/utils/schema_validator.ts
@@ -1,6 +1,7 @@
import {Validator, ValidatorResult, Schema} from 'jsonschema';
import {ecSignatureSchema, ecSignatureParameterSchema} from '../schemas/ec_signature_schema';
-import {orderSchema, signedOrderSchema, orderHashSchema} from '../schemas/order_schemas';
+import {orderHashSchema} from '../schemas/order_hash_schema';
+import {orderSchema, signedOrderSchema} from '../schemas/order_schemas';
import {addressSchema, numberSchema} from '../schemas/basic_type_schemas';
import {tokenSchema} from '../schemas/token_schema';
import {subscriptionOptsSchema, blockParamSchema} from '../schemas/subscription_opts_schema';
diff --git a/test/schema_test.ts b/test/schema_test.ts
index da7e97ce3..3d1d32d9c 100644
--- a/test/schema_test.ts
+++ b/test/schema_test.ts
@@ -6,7 +6,8 @@ import promisify = require('es6-promisify');
import {constants} from './utils/constants';
import {SchemaValidator} from '../src/utils/schema_validator';
import {tokenSchema} from '../src/schemas/token_schema';
-import {orderSchema, signedOrderSchema, orderHashSchema} from '../src/schemas/order_schemas';
+import {orderHashSchema} from '../src/schemas/order_hash_schema';
+import {orderSchema, signedOrderSchema} from '../src/schemas/order_schemas';
import {addressSchema, numberSchema} from '../src/schemas/basic_type_schemas';
import {orderFillOrKillRequestsSchema} from '../src/schemas/order_fill_or_kill_requests_schema';
import {ecSignatureParameterSchema, ecSignatureSchema} from '../src/schemas/ec_signature_schema';