aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-12-20 05:58:06 +0800
committerFabio Berger <me@fabioberger.com>2017-12-20 05:58:06 +0800
commit41104b2d457b9b662122c139ee83bb8d0f519a51 (patch)
tree4743803be2564e0e5221b9a41e2c293a6fe52dd9 /packages/json-schemas
parent2930537a512bdaa74181fea74ce6befdf5b305b4 (diff)
parentc39ac903a972930d538f8fa3292c658201b1c5e5 (diff)
downloaddexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar.gz
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar.bz2
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar.lz
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar.xz
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar.zst
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.zip
Merge branch 'development' into createWethPage
* development: (27 commits) Remove re-assignment Fix scrolling topBar on Portal Fix overflow issue on calculated fillAmount Fix faulty import Introduce an identityCommandBuilder Define types for methodID Define types for ethereumjs-abi Install types for yargs Fix comments Fix linter issues Fix linter error Rename SubscriptionOpts to BlockRange Refactor remaining _.assign to spread operator Move muiTheme into it's own module Refactor configs and constants, standardize on uppercase/snakecase, alphebetize, rename for logical grouping Sort colors into color spectrum remove unused style standarize on `grey` over `gray` spelling and other color related fixes Standardize colors to always be in uppercase hex and consolidate material-ui greys Consolidate all custom colors and material-ui colors into a colors module ... # Conflicts: # packages/website/ts/components/eth_wrappers.tsx # packages/website/ts/components/portal.tsx # packages/website/ts/utils/configs.ts # packages/website/ts/utils/constants.ts
Diffstat (limited to 'packages/json-schemas')
-rw-r--r--packages/json-schemas/CHANGELOG.md4
-rw-r--r--packages/json-schemas/schemas/block_range_schema.ts (renamed from packages/json-schemas/schemas/subscription_opts_schema.ts)4
-rw-r--r--packages/json-schemas/src/schemas.ts10
-rw-r--r--packages/json-schemas/test/schema_test.ts8
4 files changed, 15 insertions, 11 deletions
diff --git a/packages/json-schemas/CHANGELOG.md b/packages/json-schemas/CHANGELOG.md
index 9f080adeb..81225e5de 100644
--- a/packages/json-schemas/CHANGELOG.md
+++ b/packages/json-schemas/CHANGELOG.md
@@ -1,5 +1,9 @@
# CHANGELOG
+v0.x.x - _TBD, 2017_
+------------------------
+ * Rename `subscriptionOptsSchema` to `blockRangeSchema` (#272)
+
v0.6.7 - _Nov. 14, 2017_
------------------------
* Re-publish JSON-schema previously published under NPM package 0x-json-schemas
diff --git a/packages/json-schemas/schemas/subscription_opts_schema.ts b/packages/json-schemas/schemas/block_range_schema.ts
index a476e6963..b264cb66e 100644
--- a/packages/json-schemas/schemas/subscription_opts_schema.ts
+++ b/packages/json-schemas/schemas/block_range_schema.ts
@@ -10,8 +10,8 @@ export const blockParamSchema = {
],
};
-export const subscriptionOptsSchema = {
- id: '/SubscriptionOpts',
+export const blockRangeSchema = {
+ id: '/BlockRange',
properties: {
fromBlock: {$ref: '/BlockParam'},
toBlock: {$ref: '/BlockParam'},
diff --git a/packages/json-schemas/src/schemas.ts b/packages/json-schemas/src/schemas.ts
index 69164cbc7..854291a71 100644
--- a/packages/json-schemas/src/schemas.ts
+++ b/packages/json-schemas/src/schemas.ts
@@ -3,6 +3,10 @@ import {
numberSchema,
} from '../schemas/basic_type_schemas';
import {
+ blockParamSchema,
+ blockRangeSchema,
+} from '../schemas/block_range_schema';
+import {
ecSignatureParameterSchema,
ecSignatureSchema,
} from '../schemas/ec_signature_schema';
@@ -56,10 +60,6 @@ import {
signedOrdersSchema,
} from '../schemas/signed_orders_schema';
import {
- blockParamSchema,
- subscriptionOptsSchema,
-} from '../schemas/subscription_opts_schema';
-import {
tokenSchema,
} from '../schemas/token_schema';
import {
@@ -81,7 +81,7 @@ export const schemas = {
signedOrderSchema,
signedOrdersSchema,
blockParamSchema,
- subscriptionOptsSchema,
+ blockRangeSchema,
tokenSchema,
jsNumber,
txDataSchema,
diff --git a/packages/json-schemas/test/schema_test.ts b/packages/json-schemas/test/schema_test.ts
index 067b02827..e729c1925 100644
--- a/packages/json-schemas/test/schema_test.ts
+++ b/packages/json-schemas/test/schema_test.ts
@@ -23,7 +23,7 @@ const {
signedOrderSchema,
signedOrdersSchema,
blockParamSchema,
- subscriptionOptsSchema,
+ blockRangeSchema,
tokenSchema,
jsNumber,
txDataSchema,
@@ -170,21 +170,21 @@ describe('Schema', () => {
validateAgainstSchema(testCases, blockParamSchema, shouldFail);
});
});
- describe('#subscriptionOptsSchema', () => {
+ describe('#blockRangeSchema', () => {
it('should validate valid subscription opts', () => {
const testCases = [
{fromBlock: 42, toBlock: 'latest'},
{fromBlock: 42},
{},
];
- validateAgainstSchema(testCases, subscriptionOptsSchema);
+ validateAgainstSchema(testCases, blockRangeSchema);
});
it('should fail for invalid subscription opts', () => {
const testCases = [
{fromBlock: '42'},
];
const shouldFail = true;
- validateAgainstSchema(testCases, subscriptionOptsSchema, shouldFail);
+ validateAgainstSchema(testCases, blockRangeSchema, shouldFail);
});
});
describe('#tokenSchema', () => {