From f3e66110beebc40d667f37a25b12393d64d03294 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 7 Jul 2017 15:18:19 -0700 Subject: Migrate cencelOrder --- src/contract_wrappers/exchange_wrapper.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/contract_wrappers/exchange_wrapper.ts') diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index fa4b5904b..2000ebc16 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -482,27 +482,27 @@ export class ExchangeWrapper extends ContractWrapper { */ @decorators.contractCallErrorHandler public async cancelOrderAsync( - order: Order|SignedOrder, takerTokenCancelAmount: BigNumber.BigNumber): Promise { + order: Order|SignedOrder, canceltakerTokenAmount: BigNumber.BigNumber): Promise { assert.doesConformToSchema('order', order, orderSchema); - assert.isBigNumber('takerTokenCancelAmount', takerTokenCancelAmount); + assert.isBigNumber('takerTokenCancelAmount', canceltakerTokenAmount); await assert.isSenderAddressAsync('order.maker', order.maker, this._web3Wrapper); const exchangeInstance = await this._getExchangeContractAsync(order.exchangeContractAddress); - await this._validateCancelOrderAndThrowIfInvalidAsync(order, takerTokenCancelAmount); + await this._validateCancelOrderAndThrowIfInvalidAsync(order, canceltakerTokenAmount); const [orderAddresses, orderValues] = ExchangeWrapper._getOrderAddressesAndValues(order); - const gas = await exchangeInstance.cancel.estimateGas( + const gas = await exchangeInstance.cancelOrder.estimateGas( orderAddresses, orderValues, - takerTokenCancelAmount, + canceltakerTokenAmount, { from: order.maker, }, ); - const response: ContractResponse = await exchangeInstance.cancel( + const response: ContractResponse = await exchangeInstance.cancelOrder( orderAddresses, orderValues, - takerTokenCancelAmount, + canceltakerTokenAmount, { from: order.maker, gas, @@ -510,8 +510,8 @@ export class ExchangeWrapper extends ContractWrapper { ); this._throwErrorLogsAsErrors(response.logs); const logFillArgs = response.logs[0].args as LogCancelContractEventArgs; - const cancelledAmount = new BigNumber(logFillArgs.cancelledValueT); - return cancelledAmount; + const cancelledTakerTokenAmount = new BigNumber(logFillArgs.cancelledValueT); + return cancelledTakerTokenAmount; } /** * Batch version of cancelOrderAsync. Atomically cancels multiple orders in a single transaction. -- cgit v1.2.3