aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2017-11-23 12:17:11 +0800
committerJacob Evans <jacob@dekz.net>2017-11-23 12:17:11 +0800
commit5a18f43b5100a1274949bd33fab263f591e392cd (patch)
tree30ebe774fc9988e0b4c1cf2778e30bac653479ee /packages
parent924b96ce2af038a9635d5a19802b07698e19b056 (diff)
downloaddexon-sol-tools-5a18f43b5100a1274949bd33fab263f591e392cd.tar
dexon-sol-tools-5a18f43b5100a1274949bd33fab263f591e392cd.tar.gz
dexon-sol-tools-5a18f43b5100a1274949bd33fab263f591e392cd.tar.bz2
dexon-sol-tools-5a18f43b5100a1274949bd33fab263f591e392cd.tar.lz
dexon-sol-tools-5a18f43b5100a1274949bd33fab263f591e392cd.tar.xz
dexon-sol-tools-5a18f43b5100a1274949bd33fab263f591e392cd.tar.zst
dexon-sol-tools-5a18f43b5100a1274949bd33fab263f591e392cd.zip
Update to Async call
Diffstat (limited to 'packages')
-rw-r--r--packages/0x.js/test/order_state_watcher_test.ts7
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;