aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-08-09 02:57:16 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-08-09 02:57:16 +0800
commitc9e1b7c5dc4eebf447fdc97568f08db0e2546904 (patch)
treef0e6d8c4fa83b71789f4d31e67a25f423da81831
parent853b5aa38b3d52ed8bab69e2bcd7d79a0cefcfd0 (diff)
downloaddexon-0x-contracts-c9e1b7c5dc4eebf447fdc97568f08db0e2546904.tar.gz
dexon-0x-contracts-c9e1b7c5dc4eebf447fdc97568f08db0e2546904.tar.zst
dexon-0x-contracts-c9e1b7c5dc4eebf447fdc97568f08db0e2546904.zip
Change remainingFillableAmount to metaData
-rw-r--r--packages/json-schemas/schemas/relayer_api_order_schema.ts4
-rw-r--r--packages/json-schemas/test/schema_test.ts6
2 files changed, 6 insertions, 4 deletions
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);
});