aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-08-24 00:28:12 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-08-24 15:55:02 +0800
commitc6e35fbc9deb43aaf4088a90b81f5942858a0119 (patch)
tree3d2bf5f011f86d172fcf8e462fbaca86c14f2d57 /src
parentc7ce96651647b2769050686e0dae6ae51a5149d7 (diff)
downloaddexon-sol-tools-c6e35fbc9deb43aaf4088a90b81f5942858a0119.tar
dexon-sol-tools-c6e35fbc9deb43aaf4088a90b81f5942858a0119.tar.gz
dexon-sol-tools-c6e35fbc9deb43aaf4088a90b81f5942858a0119.tar.bz2
dexon-sol-tools-c6e35fbc9deb43aaf4088a90b81f5942858a0119.tar.lz
dexon-sol-tools-c6e35fbc9deb43aaf4088a90b81f5942858a0119.tar.xz
dexon-sol-tools-c6e35fbc9deb43aaf4088a90b81f5942858a0119.tar.zst
dexon-sol-tools-c6e35fbc9deb43aaf4088a90b81f5942858a0119.zip
Fix comments
Diffstat (limited to 'src')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index beaf60ba0..66cf06dee 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -645,7 +645,7 @@ export class ExchangeWrapper extends ContractWrapper {
signedOrder, fillTakerTokenAmount, takerAddress, zrxTokenAddress);
}
/**
- * Checks if order cancel will succeed and throws an error otherwise.
+ * Checks if cancelling a given order will succeed and throws an informative error if it won't.
* @param order An object that conforms to the Order or SignedOrder interface.
* The order you would like to cancel.
* @param cancelTakerTokenAmount The amount (specified in taker tokens) that you would like to cancel.
@@ -660,7 +660,7 @@ export class ExchangeWrapper extends ContractWrapper {
order, cancelTakerTokenAmount, unavailableTakerTokenAmount);
}
/**
- * Checks if fillOrKill order will succeed and throws an error otherwise.
+ * Checks if calling fillOrKill on a given order will succeed and throws an informative error if it won't.
* @param signedOrder An object that conforms to the SignedOrder interface. The
* signedOrder you wish to fill.
* @param fillTakerTokenAmount The total amount of the takerTokens you would like to fill.
@@ -678,11 +678,13 @@ export class ExchangeWrapper extends ContractWrapper {
signedOrder, fillTakerTokenAmount, takerAddress, zrxTokenAddress);
}
/**
- * Checks if rounding error will be > 0.1%
- * when computing makerTokenAmount by doing `(fillTakerTokenAmount * makerTokenAmount) / takerTokenAmount`
+ * Checks if rounding error will be > 0.1% when computing makerTokenAmount by doing:
+ * `(fillTakerTokenAmount * makerTokenAmount) / takerTokenAmount`.
+ * 0x Protocol does not accept any trades that result in large rounding errors. This means that tokens with few or
+ * no decimals can only be filled in quantities and ratios that avoid large rounding errors.
* @param fillTakerTokenAmount The amount of the order (in taker tokens baseUnits) that you wish to fill.
* @param takerTokenAmount The order size on the taker side
- * @param makerTokenAmount The order size on the maker size
+ * @param makerTokenAmount The order size on the maker side
*/
public async isRoundingErrorAsync(fillTakerTokenAmount: BigNumber.BigNumber,
takerTokenAmount: BigNumber.BigNumber,