diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-07-08 06:18:19 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-07-11 15:30:14 +0800 |
commit | 4ecfac6cb47477444d25c42e9fa569b4c47e3ee4 (patch) | |
tree | 0364a02c137dcc4bcf91b3ecaab8ca5f968b2676 /src/contract_wrappers | |
parent | 00c1198b34423ff4f999bc5998d61ab3c07a168e (diff) | |
download | dexon-sol-tools-4ecfac6cb47477444d25c42e9fa569b4c47e3ee4.tar dexon-sol-tools-4ecfac6cb47477444d25c42e9fa569b4c47e3ee4.tar.gz dexon-sol-tools-4ecfac6cb47477444d25c42e9fa569b4c47e3ee4.tar.bz2 dexon-sol-tools-4ecfac6cb47477444d25c42e9fa569b4c47e3ee4.tar.lz dexon-sol-tools-4ecfac6cb47477444d25c42e9fa569b4c47e3ee4.tar.xz dexon-sol-tools-4ecfac6cb47477444d25c42e9fa569b4c47e3ee4.tar.zst dexon-sol-tools-4ecfac6cb47477444d25c42e9fa569b4c47e3ee4.zip |
Migrate cencelOrder
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 18 |
1 files changed, 9 insertions, 9 deletions
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<BigNumber.BigNumber> { + order: Order|SignedOrder, canceltakerTokenAmount: BigNumber.BigNumber): Promise<BigNumber.BigNumber> { 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. |