diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-08-08 04:52:53 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-08-08 04:52:53 +0800 |
commit | 0a616ad3b8b87c8142598b535154564cb9276cbe (patch) | |
tree | 2069631964815b60dafd7f093cdd47579ec4d129 /packages/json-schemas | |
parent | 57a44291233548da9785aec3cde92171342c9eb3 (diff) | |
parent | 8199e8794331f555679496d32cb87ad8513c31d1 (diff) | |
download | dexon-sol-tools-0a616ad3b8b87c8142598b535154564cb9276cbe.tar.gz dexon-sol-tools-0a616ad3b8b87c8142598b535154564cb9276cbe.tar.zst dexon-sol-tools-0a616ad3b8b87c8142598b535154564cb9276cbe.zip |
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/sra/add-sra-package
Diffstat (limited to 'packages/json-schemas')
-rw-r--r-- | packages/json-schemas/CHANGELOG.json | 9 | ||||
-rw-r--r-- | packages/json-schemas/schemas/basic_type_schemas.ts | 2 | ||||
-rw-r--r-- | packages/json-schemas/test/schema_test.ts | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json index d4557d872..6017b2f2b 100644 --- a/packages/json-schemas/CHANGELOG.json +++ b/packages/json-schemas/CHANGELOG.json @@ -1,9 +1,14 @@ [ { - "version": "2.0.0", + "version": "1.0.1-rc.4", "changes": [ { - "note": "Upgrade Relayer API schemas for relayer API V1" + "note": "Change hexSchema to match `0x`", + "pr": 937 + }, + { + "note": "Upgrade Relayer API schemas for relayer API V2", + "pr": 916 } ] }, diff --git a/packages/json-schemas/schemas/basic_type_schemas.ts b/packages/json-schemas/schemas/basic_type_schemas.ts index 031383a11..a59afaef8 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: '/hexSchema', 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 ebce30e59..01fa53045 100644 --- a/packages/json-schemas/test/schema_test.ts +++ b/packages/json-schemas/test/schema_test.ts @@ -96,7 +96,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); }); |