diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-10 07:29:13 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-11-10 07:29:13 +0800 |
commit | c0db88168b250ef4db960e9eddced8f5a10ee63f (patch) | |
tree | 6a192dd0688214e08323f40aac119646d5ba2d63 /test | |
parent | 595dc6de0360a8d21db78aba81d9cd44bffc6a1c (diff) | |
download | dexon-sol-tools-c0db88168b250ef4db960e9eddced8f5a10ee63f.tar dexon-sol-tools-c0db88168b250ef4db960e9eddced8f5a10ee63f.tar.gz dexon-sol-tools-c0db88168b250ef4db960e9eddced8f5a10ee63f.tar.bz2 dexon-sol-tools-c0db88168b250ef4db960e9eddced8f5a10ee63f.tar.lz dexon-sol-tools-c0db88168b250ef4db960e9eddced8f5a10ee63f.tar.xz dexon-sol-tools-c0db88168b250ef4db960e9eddced8f5a10ee63f.tar.zst dexon-sol-tools-c0db88168b250ef4db960e9eddced8f5a10ee63f.zip |
Fix bug where we hard-coded using pendingBlock for fetching the orderState. Moved numConfirmations to become a global orderStateWatcher config
Diffstat (limited to 'test')
-rw-r--r-- | test/order_state_watcher_test.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/order_state_watcher_test.ts b/test/order_state_watcher_test.ts index 6060d64c5..8eb19dcef 100644 --- a/test/order_state_watcher_test.ts +++ b/test/order_state_watcher_test.ts @@ -88,9 +88,9 @@ describe('OrderStateWatcher', () => { zeroEx.orderStateWatcher.unsubscribe(); }); it('should fail when trying to subscribe twice', (done: DoneCallback) => { - zeroEx.orderStateWatcher.subscribe(_.noop, numConfirmations); + zeroEx.orderStateWatcher.subscribe(_.noop); try { - zeroEx.orderStateWatcher.subscribe(_.noop, numConfirmations); + zeroEx.orderStateWatcher.subscribe(_.noop); done(new Error('Expected the second subscription to fail')); } catch (err) { done(); @@ -117,7 +117,7 @@ describe('OrderStateWatcher', () => { expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.InsufficientMakerAllowance); done(); }; - zeroEx.orderStateWatcher.subscribe(callback, numConfirmations); + zeroEx.orderStateWatcher.subscribe(callback); await zeroEx.token.setProxyAllowanceAsync(makerToken.address, maker, new BigNumber(0)); })().catch(done); }); @@ -135,7 +135,7 @@ describe('OrderStateWatcher', () => { expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.InsufficientMakerBalance); done(); }; - zeroEx.orderStateWatcher.subscribe(callback, numConfirmations); + zeroEx.orderStateWatcher.subscribe(callback); const anyRecipient = taker; const makerBalance = await zeroEx.token.getBalanceAsync(makerToken.address, maker); await zeroEx.token.transferAsync(makerToken.address, maker, anyRecipient, makerBalance); @@ -160,7 +160,7 @@ describe('OrderStateWatcher', () => { done(); } }; - zeroEx.orderStateWatcher.subscribe(callback, numConfirmations); + zeroEx.orderStateWatcher.subscribe(callback); const shouldThrowOnInsufficientBalanceOrAllowance = true; await zeroEx.exchange.fillOrderAsync( @@ -194,7 +194,7 @@ describe('OrderStateWatcher', () => { done(); } }; - zeroEx.orderStateWatcher.subscribe(callback, numConfirmations); + zeroEx.orderStateWatcher.subscribe(callback); const shouldThrowOnInsufficientBalanceOrAllowance = true; await zeroEx.exchange.fillOrderAsync( signedOrder, fillAmountInBaseUnits, shouldThrowOnInsufficientBalanceOrAllowance, taker, |