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,
"inputs": [
{
"name": "numerator",
"name": "denominator",
"type": "uint256"
},
{
"name": "denominator",
"name": "numerator",
"type": "uint256"
},
{

View File

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

View File

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