From c9e1b7c5dc4eebf447fdc97568f08db0e2546904 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 8 Aug 2018 11:57:16 -0700 Subject: Change remainingFillableAmount to metaData --- packages/json-schemas/schemas/relayer_api_order_schema.ts | 4 ++-- packages/json-schemas/test/schema_test.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/json-schemas/schemas/relayer_api_order_schema.ts b/packages/json-schemas/schemas/relayer_api_order_schema.ts index 17fa146c4..3952e9683 100644 --- a/packages/json-schemas/schemas/relayer_api_order_schema.ts +++ b/packages/json-schemas/schemas/relayer_api_order_schema.ts @@ -3,7 +3,7 @@ export const relayerApiOrderSchema = { type: 'object', properties: { order: { $ref: '/orderSchema' }, - remainingFillableAmount: { $ref: '/numberSchema' }, + metaData: { type: 'object' }, }, - required: ['order', 'remainingFillableAmount'], + required: ['order', 'metaData'], }; diff --git a/packages/json-schemas/test/schema_test.ts b/packages/json-schemas/test/schema_test.ts index 01fa53045..1f59f4da2 100644 --- a/packages/json-schemas/test/schema_test.ts +++ b/packages/json-schemas/test/schema_test.ts @@ -214,7 +214,9 @@ describe('Schema', () => { }; const relayerApiOrder = { order, - remainingFillableAmount: '50000000000000', + metaData: { + someMetaData: 5, + }, }; const relayerApiOrdersResponse = { ...paginatedResponse, @@ -353,7 +355,7 @@ describe('Schema', () => { validateAgainstSchema(testCases, relayerApiOrderSchema); }); it('should fail for invalid relayer api orders', () => { - const testCases = [{}, order, { order }, { order, remainingFillableAmount: 5 }]; + const testCases = [{}, order, { order }, { order, metaData: 5 }]; const shouldFail = true; validateAgainstSchema(testCases, relayerApiOrderSchema, shouldFail); }); -- cgit v1.2.3