diff options
author | Jacob Evans <jacob@dekz.net> | 2017-11-23 12:17:11 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2017-11-23 12:17:11 +0800 |
commit | 5a18f43b5100a1274949bd33fab263f591e392cd (patch) | |
tree | 30ebe774fc9988e0b4c1cf2778e30bac653479ee /packages/0x.js/test | |
parent | 924b96ce2af038a9635d5a19802b07698e19b056 (diff) | |
download | dexon-0x-contracts-5a18f43b5100a1274949bd33fab263f591e392cd.tar.gz dexon-0x-contracts-5a18f43b5100a1274949bd33fab263f591e392cd.tar.zst dexon-0x-contracts-5a18f43b5100a1274949bd33fab263f591e392cd.zip |
Update to Async call
Diffstat (limited to 'packages/0x.js/test')
-rw-r--r-- | packages/0x.js/test/order_state_watcher_test.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/0x.js/test/order_state_watcher_test.ts b/packages/0x.js/test/order_state_watcher_test.ts index 4c19a3dc2..834099ef6 100644 --- a/packages/0x.js/test/order_state_watcher_test.ts +++ b/packages/0x.js/test/order_state_watcher_test.ts @@ -326,6 +326,7 @@ describe('OrderStateWatcher', () => { await zeroEx.orderStateWatcher.addOrderAsync(signedOrder); const callback = reportCallbackErrors(done)((orderState: OrderState) => { + expect(orderState.isValid).to.be.true(); const validOrderState = orderState as OrderStateValid; const orderRelevantState = validOrderState.orderRelevantState; expect(orderRelevantState.remainingFillableMakerTokenAmount).to.be.bignumber.equal( @@ -352,7 +353,7 @@ describe('OrderStateWatcher', () => { const remainingTokenAmount = ZeroEx.toBaseUnitAmount(new BigNumber(4), decimals); const transferTokenAmount = makerFee.sub(remainingTokenAmount); - zeroEx.orderStateWatcher.addOrder(signedOrder); + await zeroEx.orderStateWatcher.addOrderAsync(signedOrder); const callback = reportCallbackErrors(done)((orderState: OrderState) => { expect(orderState.isValid).to.be.true(); @@ -382,7 +383,7 @@ describe('OrderStateWatcher', () => { const remainingTokenAmount = ZeroEx.toBaseUnitAmount(new BigNumber(4), decimals); const transferTokenAmount = makerFee.sub(remainingTokenAmount); - zeroEx.orderStateWatcher.addOrder(signedOrder); + await zeroEx.orderStateWatcher.addOrderAsync(signedOrder); const callback = reportCallbackErrors(done)((orderState: OrderState) => { const validOrderState = orderState as OrderStateValid; @@ -407,7 +408,7 @@ describe('OrderStateWatcher', () => { taker, fillableAmount, feeRecipient); const makerBalance = await zeroEx.token.getBalanceAsync(makerToken.address, maker); - zeroEx.orderStateWatcher.addOrder(signedOrder); + await zeroEx.orderStateWatcher.addOrderAsync(signedOrder); const callback = reportCallbackErrors(done)((orderState: OrderState) => { const validOrderState = orderState as OrderStateValid; |