aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/test
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-08-02 04:52:40 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-08-02 04:52:40 +0800
commit962d6e71b6cbe7f4e267bfb16d3c9fb4de511a22 (patch)
treeb918601929a903276f4f527b40e38611523f2da8 /packages/json-schemas/test
parent48aaf228558ae7312d314a0c1f5bd920428eb39d (diff)
downloaddexon-sol-tools-962d6e71b6cbe7f4e267bfb16d3c9fb4de511a22.tar
dexon-sol-tools-962d6e71b6cbe7f4e267bfb16d3c9fb4de511a22.tar.gz
dexon-sol-tools-962d6e71b6cbe7f4e267bfb16d3c9fb4de511a22.tar.bz2
dexon-sol-tools-962d6e71b6cbe7f4e267bfb16d3c9fb4de511a22.tar.lz
dexon-sol-tools-962d6e71b6cbe7f4e267bfb16d3c9fb4de511a22.tar.xz
dexon-sol-tools-962d6e71b6cbe7f4e267bfb16d3c9fb4de511a22.tar.zst
dexon-sol-tools-962d6e71b6cbe7f4e267bfb16d3c9fb4de511a22.zip
update orders channel subscribe schema
Diffstat (limited to 'packages/json-schemas/test')
-rw-r--r--packages/json-schemas/test/schema_test.ts86
1 files changed, 12 insertions, 74 deletions
diff --git a/packages/json-schemas/test/schema_test.ts b/packages/json-schemas/test/schema_test.ts
index 7b090ad87..0b520f6e3 100644
--- a/packages/json-schemas/test/schema_test.ts
+++ b/packages/json-schemas/test/schema_test.ts
@@ -698,22 +698,22 @@ describe('Schema', () => {
type: 'subscribe',
channel: 'orders',
requestId: 'randomId',
- payload: {
- baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- quoteTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- snapshot: true,
- limit: 100,
- },
},
{
type: 'subscribe',
channel: 'orders',
requestId: 'randomId',
payload: {
- baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- quoteTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
+ makerAssetProxyId: '0x02571792',
+ takerAssetProxyId: '0xf47261b0',
},
},
+ {
+ type: 'subscribe',
+ channel: 'orders',
+ requestId: 'randomId',
+ payload: {},
+ },
];
validateAgainstSchema(testCases, relayerApiOrdersChannelSubscribeSchema);
});
@@ -723,74 +723,15 @@ describe('Schema', () => {
{
type: 'subscribe',
channel: 'orders',
- payload: {
- baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- quoteTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- snapshot: true,
- limit: 100,
- },
- },
- {
- type: 'foo',
- channel: 'orders',
- requestId: 'randomId',
- payload: {
- baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- quoteTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- },
- },
- {
- type: 'subscribe',
- channel: 'bar',
- requestId: 'randomId',
- payload: {
- baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- quoteTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- },
- },
- {
- type: 'subscribe',
- channel: 'orders',
- requestId: 'randomId',
- payload: {
- baseTokenAddress: checksummedAddress,
- quoteTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- },
- },
- {
- type: 'subscribe',
- channel: 'orders',
- requestId: 'randomId',
- payload: {
- baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- quoteTokenAddress: checksummedAddress,
- },
- },
- {
- type: 'subscribe',
- channel: 'orders',
- requestId: 'randomId',
- payload: {
- quoteTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- },
- },
- {
- type: 'subscribe',
- channel: 'orders',
- requestId: 'randomId',
- payload: {
- baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- },
},
{
type: 'subscribe',
channel: 'orders',
requestId: 'randomId',
payload: {
- baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- quoteTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- snapshot: 'true',
- limit: 100,
+ makerAssetProxyId: '0x02571792',
+ takerAssetProxyId: '0xf47261b0',
+ makerAssetAddress: checksummedAddress,
},
},
{
@@ -798,10 +739,7 @@ describe('Schema', () => {
channel: 'orders',
requestId: 'randomId',
payload: {
- baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- quoteTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- snapshot: true,
- limit: '100',
+ makerAssetProxyId: 'invalidId',
},
},
];