aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-10 01:49:35 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-10 02:04:10 +0800
commit727f6ad2307e340ed4146af0154098737206a288 (patch)
tree2cf158ac076332b3321167dcd912e9d463df2f0d
parentb6abfe49904f3aa3c8ec88ab7a00ec4fded9754a (diff)
downloaddexon-sol-tools-727f6ad2307e340ed4146af0154098737206a288.tar
dexon-sol-tools-727f6ad2307e340ed4146af0154098737206a288.tar.gz
dexon-sol-tools-727f6ad2307e340ed4146af0154098737206a288.tar.bz2
dexon-sol-tools-727f6ad2307e340ed4146af0154098737206a288.tar.lz
dexon-sol-tools-727f6ad2307e340ed4146af0154098737206a288.tar.xz
dexon-sol-tools-727f6ad2307e340ed4146af0154098737206a288.tar.zst
dexon-sol-tools-727f6ad2307e340ed4146af0154098737206a288.zip
Fix bugs in schemas
-rw-r--r--src/schemas/order_cancel_schema.ts2
-rw-r--r--src/schemas/order_fill_or_kill_requests_schema.ts2
-rw-r--r--src/schemas/order_fill_requests_schema.ts2
-rw-r--r--test/schema_test.ts6
4 files changed, 6 insertions, 6 deletions
diff --git a/src/schemas/order_cancel_schema.ts b/src/schemas/order_cancel_schema.ts
index 5cc8f745c..04b2c179f 100644
--- a/src/schemas/order_cancel_schema.ts
+++ b/src/schemas/order_cancel_schema.ts
@@ -4,7 +4,7 @@ export const orderCancellationRequestsSchema = {
items: {
properties: {
order: {$ref: '/orderSchema'},
- takerTokenCancelAmount: {type: '/numberSchema'},
+ takerTokenCancelAmount: {$ref: '/numberSchema'},
},
required: ['order', 'takerTokenCancelAmount'],
type: 'object',
diff --git a/src/schemas/order_fill_or_kill_requests_schema.ts b/src/schemas/order_fill_or_kill_requests_schema.ts
index 4db7113de..6f7878c45 100644
--- a/src/schemas/order_fill_or_kill_requests_schema.ts
+++ b/src/schemas/order_fill_or_kill_requests_schema.ts
@@ -4,7 +4,7 @@ export const orderFillOrKillRequestsSchema = {
items: {
properties: {
signedOrder: {$ref: '/signedOrderSchema'},
- fillTakerAmount: {type: '/numberSchema'},
+ fillTakerAmount: {$ref: '/numberSchema'},
},
required: ['signedOrder', 'fillTakerAmount'],
type: 'object',
diff --git a/src/schemas/order_fill_requests_schema.ts b/src/schemas/order_fill_requests_schema.ts
index 44f4e33e2..0f3ee1e99 100644
--- a/src/schemas/order_fill_requests_schema.ts
+++ b/src/schemas/order_fill_requests_schema.ts
@@ -4,7 +4,7 @@ export const orderFillRequestsSchema = {
items: {
properties: {
signedOrder: {$ref: '/signedOrderSchema'},
- takerTokenFillAmount: {type: '/numberSchema'},
+ takerTokenFillAmount: {$ref: '/numberSchema'},
},
required: ['signedOrder', 'takerTokenFillAmount'],
type: 'object',
diff --git a/test/schema_test.ts b/test/schema_test.ts
index 49dc2c1d0..e20e4f31d 100644
--- a/test/schema_test.ts
+++ b/test/schema_test.ts
@@ -192,7 +192,7 @@ describe('Schema', () => {
const orderFillOrKillRequests = [
{
signedOrder,
- fillTakerAmount: 5,
+ fillTakerAmount: '5',
},
];
it('should validate valid order fill or kill requests', () => {
@@ -217,7 +217,7 @@ describe('Schema', () => {
const orderCancellationRequests = [
{
order,
- takerTokenCancelAmount: 5,
+ takerTokenCancelAmount: '5',
},
];
it('should validate valid order cancellation requests', () => {
@@ -242,7 +242,7 @@ describe('Schema', () => {
const orderFillRequests = [
{
signedOrder,
- takerTokenFillAmount: 5,
+ takerTokenFillAmount: '5',
},
];
it('should validate valid order fill requests', () => {