aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-10 19:27:32 +0800
committerFabio Berger <me@fabioberger.com>2017-06-10 19:27:32 +0800
commit2040933149a144c5055a7eb2063d83cad2304d02 (patch)
treeb7ed8f07c79431d2e5c0ba1574e3585d69f65dbf
parent47e6fb31b8477501eed9aa38d3017589fb9bd242 (diff)
parent0e971fcc89735f2c0c681a43a53904890b965faa (diff)
downloaddexon-0x-contracts-2040933149a144c5055a7eb2063d83cad2304d02.tar.gz
dexon-0x-contracts-2040933149a144c5055a7eb2063d83cad2304d02.tar.zst
dexon-0x-contracts-2040933149a144c5055a7eb2063d83cad2304d02.zip
Merge branch 'master' into addParamReturnComments
-rw-r--r--test/exchange_wrapper_test.ts16
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 = {