Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/sra/add-sra-package
This commit is contained in:
@@ -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
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@@ -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 = {
|
||||
|
@@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user