diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-13 09:50:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-13 09:50:42 +0800 |
commit | b0be323e899ea7be42b6c695b4fd6d526070b213 (patch) | |
tree | 86042b06c407b388e39be690d9a40db218f82675 /test/token_wrapper_test.ts | |
parent | 1392a855bb17981f7680548a23062842fb6dc4e0 (diff) | |
parent | a22661670f105a2bf527aca0e803689e0302ed17 (diff) | |
download | dexon-sol-tools-b0be323e899ea7be42b6c695b4fd6d526070b213.tar dexon-sol-tools-b0be323e899ea7be42b6c695b4fd6d526070b213.tar.gz dexon-sol-tools-b0be323e899ea7be42b6c695b4fd6d526070b213.tar.bz2 dexon-sol-tools-b0be323e899ea7be42b6c695b4fd6d526070b213.tar.lz dexon-sol-tools-b0be323e899ea7be42b6c695b4fd6d526070b213.tar.xz dexon-sol-tools-b0be323e899ea7be42b6c695b4fd6d526070b213.tar.zst dexon-sol-tools-b0be323e899ea7be42b6c695b4fd6d526070b213.zip |
Merge pull request #205 from 0xProject/orderWatcher
Order watcher
Diffstat (limited to 'test/token_wrapper_test.ts')
-rw-r--r-- | test/token_wrapper_test.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/token_wrapper_test.ts b/test/token_wrapper_test.ts index d9d0fb9ad..40652d03c 100644 --- a/test/token_wrapper_test.ts +++ b/test/token_wrapper_test.ts @@ -17,6 +17,7 @@ import { TokenContractEventArgs, LogWithDecodedArgs, LogEvent, + DecodedLogEvent, } from '../src'; import {BlockchainLifecycle} from './utils/blockchain_lifecycle'; import {TokenUtils} from './utils/token_utils'; @@ -358,7 +359,7 @@ describe('TokenWrapper', () => { // Source: https://github.com/mochajs/mocha/issues/2407 it('Should receive the Transfer event when tokens are transfered', (done: DoneCallback) => { (async () => { - const callback = (err: Error, logEvent: LogEvent<TransferContractEventArgs>) => { + const callback = (err: Error, logEvent: DecodedLogEvent<TransferContractEventArgs>) => { expect(logEvent).to.not.be.undefined(); const args = logEvent.args; expect(args._from).to.be.equal(coinbase); @@ -373,7 +374,7 @@ describe('TokenWrapper', () => { }); it('Should receive the Approval event when allowance is being set', (done: DoneCallback) => { (async () => { - const callback = (err: Error, logEvent: LogEvent<ApprovalContractEventArgs>) => { + const callback = (err: Error, logEvent: DecodedLogEvent<ApprovalContractEventArgs>) => { expect(logEvent).to.not.be.undefined(); const args = logEvent.args; expect(args._owner).to.be.equal(coinbase); @@ -388,13 +389,13 @@ describe('TokenWrapper', () => { }); it('Outstanding subscriptions are cancelled when zeroEx.setProviderAsync called', (done: DoneCallback) => { (async () => { - const callbackNeverToBeCalled = (err: Error, logEvent: LogEvent<TransferContractEventArgs>) => { + const callbackNeverToBeCalled = (err: Error, logEvent: DecodedLogEvent<ApprovalContractEventArgs>) => { done(new Error('Expected this subscription to have been cancelled')); }; zeroEx.token.subscribe( tokenAddress, TokenEvents.Transfer, indexFilterValues, callbackNeverToBeCalled, ); - const callbackToBeCalled = (err: Error, logEvent: LogEvent<TransferContractEventArgs>) => { + const callbackToBeCalled = (err: Error, logEvent: DecodedLogEvent<ApprovalContractEventArgs>) => { done(); }; const newProvider = web3Factory.getRpcProvider(); @@ -407,7 +408,7 @@ describe('TokenWrapper', () => { }); it('Should cancel subscription when unsubscribe called', (done: DoneCallback) => { (async () => { - const callbackNeverToBeCalled = (err: Error, logEvent: LogEvent<TokenContractEventArgs>) => { + const callbackNeverToBeCalled = (err: Error, logEvent: DecodedLogEvent<ApprovalContractEventArgs>) => { done(new Error('Expected this subscription to have been cancelled')); }; const subscriptionToken = zeroEx.token.subscribe( |