diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-07 19:20:02 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-07 19:26:13 +0800 |
commit | 2947f55acf932703a54d3177b0c4d9e115c861c2 (patch) | |
tree | 09cce4683bd2b56d968a48f771ae1038cb02e054 /src/contract_wrappers | |
parent | d55213e1aa1bf5d934afaef3f28d4b5c7a5cc7f9 (diff) | |
download | dexon-sol-tools-2947f55acf932703a54d3177b0c4d9e115c861c2.tar dexon-sol-tools-2947f55acf932703a54d3177b0c4d9e115c861c2.tar.gz dexon-sol-tools-2947f55acf932703a54d3177b0c4d9e115c861c2.tar.bz2 dexon-sol-tools-2947f55acf932703a54d3177b0c4d9e115c861c2.tar.lz dexon-sol-tools-2947f55acf932703a54d3177b0c4d9e115c861c2.tar.xz dexon-sol-tools-2947f55acf932703a54d3177b0c4d9e115c861c2.tar.zst dexon-sol-tools-2947f55acf932703a54d3177b0c4d9e115c861c2.zip |
Add tests for batchCancelAsync
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index 1a675ee8e..690f90360 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -234,7 +234,7 @@ export class ExchangeWrapper extends ContractWrapper { orders: Array<Order|SignedOrder>, takerTokenCancelAmounts: BigNumber.BigNumber[]): Promise<void> { const makers = _.map(orders, order => order.maker); assert.isSameLength('orders', orders, 'takerTokenCancelAmounts', takerTokenCancelAmounts); - assert.assert(_.isEmpty(orders), 'Can not cancel an empty batch'); + assert.assert(!_.isEmpty(orders), 'Can not cancel an empty batch'); assert.assert(_.uniq(makers).length === 1, 'Can not cancel orders from multiple makers in a single batch'); const maker = makers[0]; // _.zip doesn't type check if values have different types :'( |