diff options
author | Fabio Berger <me@fabioberger.com> | 2017-06-10 19:27:32 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-06-10 19:27:32 +0800 |
commit | 2040933149a144c5055a7eb2063d83cad2304d02 (patch) | |
tree | b7ed8f07c79431d2e5c0ba1574e3585d69f65dbf | |
parent | 47e6fb31b8477501eed9aa38d3017589fb9bd242 (diff) | |
parent | 0e971fcc89735f2c0c681a43a53904890b965faa (diff) | |
download | dexon-sol-tools-2040933149a144c5055a7eb2063d83cad2304d02.tar dexon-sol-tools-2040933149a144c5055a7eb2063d83cad2304d02.tar.gz dexon-sol-tools-2040933149a144c5055a7eb2063d83cad2304d02.tar.bz2 dexon-sol-tools-2040933149a144c5055a7eb2063d83cad2304d02.tar.lz dexon-sol-tools-2040933149a144c5055a7eb2063d83cad2304d02.tar.xz dexon-sol-tools-2040933149a144c5055a7eb2063d83cad2304d02.tar.zst dexon-sol-tools-2040933149a144c5055a7eb2063d83cad2304d02.zip |
Merge branch 'master' into addParamReturnComments
-rw-r--r-- | test/exchange_wrapper_test.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index 6a511e68d..1b97d7b05 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -643,6 +643,22 @@ describe('ExchangeWrapper', () => { ); })(); }); + it('Should receive the LogCancel event when an order is cancelled', (done: DoneCallback) => { + (async () => { + const subscriptionOpts: SubscriptionOpts = { + fromBlock: 0, + toBlock: 'latest', + }; + await zeroEx.exchange.subscribeAsync(ExchangeEvents.LogCancel, subscriptionOpts, + indexFilterValues, (err: Error, event: ContractEvent) => { + expect(err).to.be.null(); + expect(event).to.not.be.undefined(); + done(); + }); + const cancelTakerAmountInBaseUnits = new BigNumber(1); + await zeroEx.exchange.cancelOrderAsync(signedOrder, cancelTakerAmountInBaseUnits); + })(); + }); it('Outstanding subscriptions are cancelled when zeroEx.setProviderAsync called', (done: DoneCallback) => { (async () => { const subscriptionOpts: SubscriptionOpts = { |