Revert "Migrate isRoundingError parameter changes"

This reverts commit 9a200c67210599faf5eb735893abae99f72a4d1f.
This commit is contained in:
Leonid Logvinov
2017-07-07 15:06:07 -07:00
committed by Fabio Berger
parent 15f68f9b54
commit 00c1198b34
3 changed files with 9 additions and 9 deletions

View File

@@ -31,11 +31,11 @@
"constant": true, "constant": true,
"inputs": [ "inputs": [
{ {
"name": "numerator", "name": "denominator",
"type": "uint256" "type": "uint256"
}, },
{ {
"name": "denominator", "name": "numerator",
"type": "uint256" "type": "uint256"
}, },
{ {

View File

@@ -662,7 +662,7 @@ export class ExchangeWrapper extends ContractWrapper {
senderAddress, zrxTokenAddress); senderAddress, zrxTokenAddress);
const wouldRoundingErrorOccur = await this._isRoundingErrorAsync( const wouldRoundingErrorOccur = await this._isRoundingErrorAsync(
fillTakerAmount, signedOrder.takerTokenAmount, signedOrder.makerTokenAmount, signedOrder.takerTokenAmount, fillTakerAmount, signedOrder.makerTokenAmount,
signedOrder.exchangeContractAddress, signedOrder.exchangeContractAddress,
); );
if (wouldRoundingErrorOccur) { if (wouldRoundingErrorOccur) {
@@ -764,14 +764,14 @@ export class ExchangeWrapper extends ContractWrapper {
throw new Error(errMessage); throw new Error(errMessage);
} }
} }
private async _isRoundingErrorAsync(numerator: BigNumber.BigNumber, private async _isRoundingErrorAsync(takerTokenAmount: BigNumber.BigNumber,
denominator: BigNumber.BigNumber, fillTakerAmount: BigNumber.BigNumber,
target: BigNumber.BigNumber, makerTokenAmount: BigNumber.BigNumber,
exchangeContractAddress: string): Promise<boolean> { exchangeContractAddress: string): Promise<boolean> {
await assert.isUserAddressAvailableAsync(this._web3Wrapper); await assert.isUserAddressAvailableAsync(this._web3Wrapper);
const exchangeInstance = await this._getExchangeContractAsync(exchangeContractAddress); const exchangeInstance = await this._getExchangeContractAsync(exchangeContractAddress);
const isRoundingError = await exchangeInstance.isRoundingError.call( const isRoundingError = await exchangeInstance.isRoundingError.call(
numerator, denominator, target, takerTokenAmount, fillTakerAmount, makerTokenAmount,
); );
return isRoundingError; return isRoundingError;
} }

View File

@@ -68,8 +68,8 @@ export interface ExchangeContract extends ContractInstance {
call: (orderHash: string) => BigNumber.BigNumber; call: (orderHash: string) => BigNumber.BigNumber;
}; };
isRoundingError: { isRoundingError: {
call: (numerator: BigNumber.BigNumber, denominator: BigNumber.BigNumber, call: (takerTokenAmount: BigNumber.BigNumber, fillTakerAmount: BigNumber.BigNumber,
target: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<boolean>; makerTokenAmount: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<boolean>;
}; };
fill: { fill: {
(orderAddresses: OrderAddresses, orderValues: OrderValues, fillAmount: BigNumber.BigNumber, (orderAddresses: OrderAddresses, orderValues: OrderValues, fillAmount: BigNumber.BigNumber,