diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-08-09 23:03:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-09 23:03:41 +0800 |
commit | 15e15f994a1b18cf2e9be151194c826d53a01601 (patch) | |
tree | 57b6db2615875c00cb16b1c94c7be113c2a18618 /packages/json-schemas | |
parent | d44ff6a91582ed2b4dc25059d52556c4f9c6e163 (diff) | |
parent | 53713188fee57391040c24cc627fdc5ab8982d2e (diff) | |
download | dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.tar dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.tar.gz dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.tar.bz2 dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.tar.lz dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.tar.xz dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.tar.zst dexon-sol-tools-15e15f994a1b18cf2e9be151194c826d53a01601.zip |
Merge branch 'development' into sol-cov-fixes
Diffstat (limited to 'packages/json-schemas')
-rw-r--r-- | packages/json-schemas/CHANGELOG.json | 4 | ||||
-rw-r--r-- | packages/json-schemas/package.json | 2 | ||||
-rw-r--r-- | packages/json-schemas/schemas/basic_type_schemas.ts | 2 | ||||
-rw-r--r-- | packages/json-schemas/test/schema_test.ts | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json index 5ed7cc6ee..81f8e3220 100644 --- a/packages/json-schemas/CHANGELOG.json +++ b/packages/json-schemas/CHANGELOG.json @@ -5,6 +5,10 @@ { "note": "Allow for additional properties in txData schema", "pr": 938 + }, + { + "note": "Change hexSchema to match `0x`", + "pr": 937 } ] }, diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 4793fc0d5..6f0376d1b 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -70,7 +70,7 @@ "shx": "^0.2.2", "tslint": "5.11.0", "typedoc": "0xProject/typedoc", - "typescript": "2.7.1" + "typescript": "2.9.2" }, "publishConfig": { "access": "public" diff --git a/packages/json-schemas/schemas/basic_type_schemas.ts b/packages/json-schemas/schemas/basic_type_schemas.ts index 7565df9e0..301f9ec73 100644 --- a/packages/json-schemas/schemas/basic_type_schemas.ts +++ b/packages/json-schemas/schemas/basic_type_schemas.ts @@ -7,7 +7,7 @@ export const addressSchema = { export const hexSchema = { id: '/Hex', type: 'string', - pattern: '^0x([0-9a-f][0-9a-f])+$', + pattern: '^0x(([0-9a-f][0-9a-f])+)?$', }; export const numberSchema = { diff --git a/packages/json-schemas/test/schema_test.ts b/packages/json-schemas/test/schema_test.ts index d202b5643..f84553df1 100644 --- a/packages/json-schemas/test/schema_test.ts +++ b/packages/json-schemas/test/schema_test.ts @@ -89,7 +89,7 @@ describe('Schema', () => { validateAgainstSchema(testCases, hexSchema); }); it('should fail for invalid hex string', () => { - const testCases = ['0x', '0', '0xzzzzzzB11a196601eD2ce54B665CaFEca0347D42']; + const testCases = ['0', '0xzzzzzzB11a196601eD2ce54B665CaFEca0347D42']; const shouldFail = true; validateAgainstSchema(testCases, hexSchema, shouldFail); }); |