Fixx request payload and expected responses
This commit is contained in:
parent
0ea8669552
commit
5e39eae84e
@ -262,7 +262,9 @@ describe('OrderWatcherWebSocketServer', async () => {
|
|||||||
id: 1,
|
id: 1,
|
||||||
jsonrpc: '2.0',
|
jsonrpc: '2.0',
|
||||||
method: 'ADD_ORDER',
|
method: 'ADD_ORDER',
|
||||||
|
params: {
|
||||||
signedOrder: nonZeroMakerFeeSignedOrder,
|
signedOrder: nonZeroMakerFeeSignedOrder,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set up a second client and have it add the order
|
// 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
|
// Check that both clients receive the emitted event by awaiting the onMessageAsync promises
|
||||||
let updateMsg = await clientOneOnMessagePromise;
|
let updateMsg = await clientOneOnMessagePromise;
|
||||||
let updateData = JSON.parse(updateMsg.data);
|
let updateData = JSON.parse(updateMsg.data);
|
||||||
let orderState = updateData.result as OrderStateValid;
|
let orderState = updateData.result as OrderStateInvalid;
|
||||||
expect(orderState.isValid).to.be.true();
|
expect(orderState.isValid).to.be.false();
|
||||||
expect(orderState.orderRelevantState.makerFeeProxyAllowance).to.be.eq('0');
|
expect(orderState.error).to.be.eq('INSUFFICIENT_MAKER_FEE_ALLOWANCE');
|
||||||
|
|
||||||
updateMsg = await clientTwoOnMessagePromise;
|
updateMsg = await clientTwoOnMessagePromise;
|
||||||
updateData = JSON.parse(updateMsg.data);
|
updateData = JSON.parse(updateMsg.data);
|
||||||
orderState = updateData.result as OrderStateValid;
|
orderState = updateData.result as OrderStateInvalid;
|
||||||
expect(orderState.isValid).to.be.true();
|
expect(orderState.isValid).to.be.false();
|
||||||
expect(orderState.orderRelevantState.makerFeeProxyAllowance).to.be.eq('0');
|
expect(orderState.error).to.be.eq('INSUFFICIENT_MAKER_FEE_ALLOWANCE');
|
||||||
|
|
||||||
wsClientTwo.close();
|
wsClientTwo.close();
|
||||||
logUtils.log(`${new Date()} [Client] Closed.`);
|
logUtils.log(`${new Date()} [Client] Closed.`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user