aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-07-08 06:06:07 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-07-08 08:45:39 +0800
commitbc300a37972eff08217dfcbf86b9e4a65f943402 (patch)
tree6b0f55ff43d9d6906e40a8a5021c2bc960a3cd93 /src
parent049a3be1027c46be666c806def2ad57a0c1ad255 (diff)
downloaddexon-sol-tools-bc300a37972eff08217dfcbf86b9e4a65f943402.tar
dexon-sol-tools-bc300a37972eff08217dfcbf86b9e4a65f943402.tar.gz
dexon-sol-tools-bc300a37972eff08217dfcbf86b9e4a65f943402.tar.bz2
dexon-sol-tools-bc300a37972eff08217dfcbf86b9e4a65f943402.tar.lz
dexon-sol-tools-bc300a37972eff08217dfcbf86b9e4a65f943402.tar.xz
dexon-sol-tools-bc300a37972eff08217dfcbf86b9e4a65f943402.tar.zst
dexon-sol-tools-bc300a37972eff08217dfcbf86b9e4a65f943402.zip
Revert "Migrate isRoundingError parameter changes"
This reverts commit 9a200c67210599faf5eb735893abae99f72a4d1f.
Diffstat (limited to 'src')
-rw-r--r--src/artifacts/exchange/Exchange_v1.json4
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts10
-rw-r--r--src/types.ts4
3 files changed, 9 insertions, 9 deletions
diff --git a/src/artifacts/exchange/Exchange_v1.json b/src/artifacts/exchange/Exchange_v1.json
index af36e870d..df7c3c6d6 100644
--- a/src/artifacts/exchange/Exchange_v1.json
+++ b/src/artifacts/exchange/Exchange_v1.json
@@ -31,11 +31,11 @@
"constant": true,
"inputs": [
{
- "name": "numerator",
+ "name": "denominator",
"type": "uint256"
},
{
- "name": "denominator",
+ "name": "numerator",
"type": "uint256"
},
{
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index f66e91534..fa4b5904b 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(
- 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;
}
diff --git a/src/types.ts b/src/types.ts
index 35dfd74d7..66881e170 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -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,