diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-08-13 08:56:09 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-08-17 08:31:21 +0800 |
commit | a4d6bc3190049996e68076eaf56762c05a71c88e (patch) | |
tree | 388355f80ce846cb4351b5c26e7b2d1f1c938e78 /packages/contracts/test/utils | |
parent | 0b9a9d92afc48745b2e4b438f31640c362882f78 (diff) | |
download | dexon-sol-tools-a4d6bc3190049996e68076eaf56762c05a71c88e.tar dexon-sol-tools-a4d6bc3190049996e68076eaf56762c05a71c88e.tar.gz dexon-sol-tools-a4d6bc3190049996e68076eaf56762c05a71c88e.tar.bz2 dexon-sol-tools-a4d6bc3190049996e68076eaf56762c05a71c88e.tar.lz dexon-sol-tools-a4d6bc3190049996e68076eaf56762c05a71c88e.tar.xz dexon-sol-tools-a4d6bc3190049996e68076eaf56762c05a71c88e.tar.zst dexon-sol-tools-a4d6bc3190049996e68076eaf56762c05a71c88e.zip |
Fix tests that assumed logs were being filtered
Diffstat (limited to 'packages/contracts/test/utils')
-rw-r--r-- | packages/contracts/test/utils/exchange_wrapper.ts | 3 | ||||
-rw-r--r-- | packages/contracts/test/utils/fill_order_combinatorial_utils.ts | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/packages/contracts/test/utils/exchange_wrapper.ts b/packages/contracts/test/utils/exchange_wrapper.ts index d57592d6d..f2b9e76d7 100644 --- a/packages/contracts/test/utils/exchange_wrapper.ts +++ b/packages/contracts/test/utils/exchange_wrapper.ts @@ -266,4 +266,7 @@ export class ExchangeWrapper { ); return data; } + public getExchangeAddress(): string { + return this._exchange.address; + } } diff --git a/packages/contracts/test/utils/fill_order_combinatorial_utils.ts b/packages/contracts/test/utils/fill_order_combinatorial_utils.ts index f18ad0dd3..a9318571c 100644 --- a/packages/contracts/test/utils/fill_order_combinatorial_utils.ts +++ b/packages/contracts/test/utils/fill_order_combinatorial_utils.ts @@ -504,7 +504,11 @@ export class FillOrderCombinatorialUtils { const actFilledTakerAmount = await this.exchangeWrapper.getTakerAssetFilledAmountAsync(orderHash); expect(actFilledTakerAmount).to.be.bignumber.equal(expFilledTakerAmount, 'filledTakerAmount'); - expect(txReceipt.logs.length).to.be.equal(1, 'logs length'); + const exchangeLogs = _.filter( + txReceipt.logs, + txLog => txLog.address === this.exchangeWrapper.getExchangeAddress(), + ); + expect(exchangeLogs.length).to.be.equal(1, 'logs length'); // tslint:disable-next-line:no-unnecessary-type-assertion const log = txReceipt.logs[0] as LogWithDecodedArgs<ExchangeFillEventArgs>; expect(log.args.makerAddress).to.be.equal(makerAddress, 'log.args.makerAddress'); |