diff options
author | Fabio Berger <me@fabioberger.com> | 2019-01-08 22:37:50 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2019-01-08 22:37:50 +0800 |
commit | 5e39eae84edc2bb8ad4d40936bf2005363dc1e59 (patch) | |
tree | 50939fb6104f5ce6a9bb1f5ab489c9e2f8d35f8e | |
parent | 0ea86695524b91167f8824ba820eed4bb0ee6ee1 (diff) | |
download | dexon-sol-tools-5e39eae84edc2bb8ad4d40936bf2005363dc1e59.tar dexon-sol-tools-5e39eae84edc2bb8ad4d40936bf2005363dc1e59.tar.gz dexon-sol-tools-5e39eae84edc2bb8ad4d40936bf2005363dc1e59.tar.bz2 dexon-sol-tools-5e39eae84edc2bb8ad4d40936bf2005363dc1e59.tar.lz dexon-sol-tools-5e39eae84edc2bb8ad4d40936bf2005363dc1e59.tar.xz dexon-sol-tools-5e39eae84edc2bb8ad4d40936bf2005363dc1e59.tar.zst dexon-sol-tools-5e39eae84edc2bb8ad4d40936bf2005363dc1e59.zip |
Fixx request payload and expected responses
-rw-r--r-- | packages/order-watcher/test/order_watcher_web_socket_server_test.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/order-watcher/test/order_watcher_web_socket_server_test.ts b/packages/order-watcher/test/order_watcher_web_socket_server_test.ts index e3f416369..36135f65c 100644 --- a/packages/order-watcher/test/order_watcher_web_socket_server_test.ts +++ b/packages/order-watcher/test/order_watcher_web_socket_server_test.ts @@ -262,7 +262,9 @@ describe('OrderWatcherWebSocketServer', async () => { id: 1, jsonrpc: '2.0', method: 'ADD_ORDER', + params: { signedOrder: nonZeroMakerFeeSignedOrder, + }, }; // Set up a second client and have it add the order @@ -280,15 +282,15 @@ describe('OrderWatcherWebSocketServer', async () => { // Check that both clients receive the emitted event by awaiting the onMessageAsync promises let updateMsg = await clientOneOnMessagePromise; let updateData = JSON.parse(updateMsg.data); - let orderState = updateData.result as OrderStateValid; - expect(orderState.isValid).to.be.true(); - expect(orderState.orderRelevantState.makerFeeProxyAllowance).to.be.eq('0'); + let orderState = updateData.result as OrderStateInvalid; + expect(orderState.isValid).to.be.false(); + expect(orderState.error).to.be.eq('INSUFFICIENT_MAKER_FEE_ALLOWANCE'); updateMsg = await clientTwoOnMessagePromise; updateData = JSON.parse(updateMsg.data); - orderState = updateData.result as OrderStateValid; - expect(orderState.isValid).to.be.true(); - expect(orderState.orderRelevantState.makerFeeProxyAllowance).to.be.eq('0'); + orderState = updateData.result as OrderStateInvalid; + expect(orderState.isValid).to.be.false(); + expect(orderState.error).to.be.eq('INSUFFICIENT_MAKER_FEE_ALLOWANCE'); wsClientTwo.close(); logUtils.log(`${new Date()} [Client] Closed.`); |