diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-07-08 07:01:40 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-07-11 15:30:14 +0800 |
commit | 722c24d127cf889ad977eaa8352772aa475e9fc1 (patch) | |
tree | 82f578f89911ade09617419fa22cedb55701073a /src/contract_wrappers/exchange_wrapper.ts | |
parent | 720b2a25060080e7e6cb55a8488d2d6030c6b3ee (diff) | |
download | dexon-0x-contracts-722c24d127cf889ad977eaa8352772aa475e9fc1.tar.gz dexon-0x-contracts-722c24d127cf889ad977eaa8352772aa475e9fc1.tar.zst dexon-0x-contracts-722c24d127cf889ad977eaa8352772aa475e9fc1.zip |
Migrate fillOrKillOrder
Diffstat (limited to 'src/contract_wrappers/exchange_wrapper.ts')
-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 5bf4a3bf3..da7e22f61 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -371,29 +371,29 @@ export class ExchangeWrapper extends ContractWrapper { * the fill order is abandoned. * @param signedOrder An object that conforms to the SignedOrder interface. The * signedOrder you wish to fill. - * @param takerTokenFillAmount The total amount of the takerTokens you would like to fill. + * @param fillTakerTokenAmount The total amount of the takerTokens you would like to fill. * @param takerAddress The user Ethereum address who would like to fill this order. * Must be available via the supplied Web3.Provider passed to 0x.js. */ @decorators.contractCallErrorHandler - public async fillOrKillOrderAsync(signedOrder: SignedOrder, takerTokenFillAmount: BigNumber.BigNumber, + public async fillOrKillOrderAsync(signedOrder: SignedOrder, fillTakerTokenAmount: BigNumber.BigNumber, takerAddress: string): Promise<void> { assert.doesConformToSchema('signedOrder', signedOrder, signedOrderSchema); - assert.isBigNumber('takerTokenFillAmount', takerTokenFillAmount); + assert.isBigNumber('fillTakerTokenAmount', fillTakerTokenAmount); await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); const exchangeInstance = await this._getExchangeContractAsync(signedOrder.exchangeContractAddress); - await this._validateFillOrderAndThrowIfInvalidAsync(signedOrder, takerTokenFillAmount, takerAddress); + await this._validateFillOrderAndThrowIfInvalidAsync(signedOrder, fillTakerTokenAmount, takerAddress); await this._validateFillOrKillOrderAndThrowIfInvalidAsync(signedOrder, exchangeInstance.address, - takerTokenFillAmount); + fillTakerTokenAmount); const [orderAddresses, orderValues] = ExchangeWrapper._getOrderAddressesAndValues(signedOrder); - const gas = await exchangeInstance.fillOrKill.estimateGas( + const gas = await exchangeInstance.fillOrKillOrder.estimateGas( orderAddresses, orderValues, - takerTokenFillAmount, + fillTakerTokenAmount, signedOrder.ecSignature.v, signedOrder.ecSignature.r, signedOrder.ecSignature.s, @@ -401,10 +401,10 @@ export class ExchangeWrapper extends ContractWrapper { from: takerAddress, }, ); - const response: ContractResponse = await exchangeInstance.fillOrKill( + const response: ContractResponse = await exchangeInstance.fillOrKillOrder( orderAddresses, orderValues, - takerTokenFillAmount, + fillTakerTokenAmount, signedOrder.ecSignature.v, signedOrder.ecSignature.r, signedOrder.ecSignature.s, |