diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-07-08 05:39:04 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-07-11 15:30:14 +0800 |
commit | 197e38adaeb2c6d6258d328ad6c9305709279c93 (patch) | |
tree | df00fbebec5525028ebd934e5094dc489ec05caa /src/contract_wrappers | |
parent | c21c3220560a88584fa67befadcb17f42517deb1 (diff) | |
download | dexon-sol-tools-197e38adaeb2c6d6258d328ad6c9305709279c93.tar dexon-sol-tools-197e38adaeb2c6d6258d328ad6c9305709279c93.tar.gz dexon-sol-tools-197e38adaeb2c6d6258d328ad6c9305709279c93.tar.bz2 dexon-sol-tools-197e38adaeb2c6d6258d328ad6c9305709279c93.tar.lz dexon-sol-tools-197e38adaeb2c6d6258d328ad6c9305709279c93.tar.xz dexon-sol-tools-197e38adaeb2c6d6258d328ad6c9305709279c93.tar.zst dexon-sol-tools-197e38adaeb2c6d6258d328ad6c9305709279c93.zip |
Migrate isRoundingError parameter changes
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index a06471bba..9bedb1b3c 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -662,7 +662,7 @@ export class ExchangeWrapper extends ContractWrapper { senderAddress, zrxTokenAddress); const wouldRoundingErrorOccur = await this._isRoundingErrorAsync( - signedOrder.takerTokenAmount, fillTakerAmount, signedOrder.makerTokenAmount, + fillTakerAmount, signedOrder.takerTokenAmount, signedOrder.makerTokenAmount, signedOrder.exchangeContractAddress, ); if (wouldRoundingErrorOccur) { @@ -764,14 +764,14 @@ export class ExchangeWrapper extends ContractWrapper { throw new Error(errMessage); } } - private async _isRoundingErrorAsync(takerTokenAmount: BigNumber.BigNumber, - fillTakerAmount: BigNumber.BigNumber, - makerTokenAmount: BigNumber.BigNumber, + private async _isRoundingErrorAsync(numerator: BigNumber.BigNumber, + denominator: BigNumber.BigNumber, + target: BigNumber.BigNumber, exchangeContractAddress: string): Promise<boolean> { await assert.isUserAddressAvailableAsync(this._web3Wrapper); const exchangeInstance = await this._getExchangeContractAsync(exchangeContractAddress); const isRoundingError = await exchangeInstance.isRoundingError.call( - takerTokenAmount, fillTakerAmount, makerTokenAmount, + numerator, denominator, target, ); return isRoundingError; } |