aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2018-08-07 04:36:32 +0800
committerGitHub <noreply@github.com>2018-08-07 04:36:32 +0800
commit8199e8794331f555679496d32cb87ad8513c31d1 (patch)
treefe98a12a88f1c44b291b61c7836837e32d53d847 /packages/json-schemas
parent47fef1f8ff583879fa83a7a44086b14f69c09e21 (diff)
parent35201af4b1aa64a0961de0d13ce9c5bac65ddbf8 (diff)
downloaddexon-sol-tools-8199e8794331f555679496d32cb87ad8513c31d1.tar
dexon-sol-tools-8199e8794331f555679496d32cb87ad8513c31d1.tar.gz
dexon-sol-tools-8199e8794331f555679496d32cb87ad8513c31d1.tar.bz2
dexon-sol-tools-8199e8794331f555679496d32cb87ad8513c31d1.tar.lz
dexon-sol-tools-8199e8794331f555679496d32cb87ad8513c31d1.tar.xz
dexon-sol-tools-8199e8794331f555679496d32cb87ad8513c31d1.tar.zst
dexon-sol-tools-8199e8794331f555679496d32cb87ad8513c31d1.zip
Merge pull request #937 from 0xProject/feature/contract-wrappers/forwarder-estimation-utils
Add marketUtils object for assisting with market buy calculations
Diffstat (limited to 'packages/json-schemas')
-rw-r--r--packages/json-schemas/CHANGELOG.json9
-rw-r--r--packages/json-schemas/schemas/basic_type_schemas.ts2
-rw-r--r--packages/json-schemas/test/schema_test.ts2
3 files changed, 11 insertions, 2 deletions
diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json
index 31da6a7f7..33cf126e3 100644
--- a/packages/json-schemas/CHANGELOG.json
+++ b/packages/json-schemas/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "1.0.1-rc.4",
+ "changes": [
+ {
+ "note": "Change hexSchema to match `0x`",
+ "pr": 937
+ }
+ ]
+ },
+ {
"version": "1.0.1-rc.3",
"changes": [
{
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);
});