diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-08 17:36:40 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-08 17:36:40 +0800 |
commit | 6d560f1be1f317cbf4352e37d5a7259b2218065c (patch) | |
tree | f72af4e22b22b974cb4afd9181fb3078c43315b5 /src/contract_wrappers | |
parent | 931f0f08a52a14c97aa939d98ed3dcf6c72ff6b9 (diff) | |
download | dexon-sol-tools-6d560f1be1f317cbf4352e37d5a7259b2218065c.tar dexon-sol-tools-6d560f1be1f317cbf4352e37d5a7259b2218065c.tar.gz dexon-sol-tools-6d560f1be1f317cbf4352e37d5a7259b2218065c.tar.bz2 dexon-sol-tools-6d560f1be1f317cbf4352e37d5a7259b2218065c.tar.lz dexon-sol-tools-6d560f1be1f317cbf4352e37d5a7259b2218065c.tar.xz dexon-sol-tools-6d560f1be1f317cbf4352e37d5a7259b2218065c.tar.zst dexon-sol-tools-6d560f1be1f317cbf4352e37d5a7259b2218065c.zip |
Address old feedback
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index 107a8f618..57becde24 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -181,7 +181,7 @@ export class ExchangeWrapper extends ContractWrapper { public async batchFillOrderAsync(orderFillRequests: OrderFillRequest[], shouldCheckTransfer: boolean, takerAddress: string): Promise<void> { if (_.isEmpty(orderFillRequests)) { - return; + return; // no-op } assert.isBoolean('shouldCheckTransfer', shouldCheckTransfer); await assert.isSenderAddressAsync('takerAddress', takerAddress, this.web3Wrapper); @@ -205,10 +205,11 @@ export class ExchangeWrapper extends ContractWrapper { orderFillRequest.signedOrder.ecSignature.s, ]; }); - // _.unzip doesn't type check if values have different types :'( + // We use _.unzip<any> because _.unzip doesn't type check if values have different types :'( const [orderAddressesArray, orderValuesArray, takerTokenFillAmountArray, vArray, rArray, sArray] = _.unzip<any>( orderAddressesValuesAmountsAndSignatureArray, ); + const gas = await exchangeInstance.batchFill.estimateGas( orderAddressesArray, orderValuesArray, |