aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2017-11-23 12:14:33 +0800
committerJacob Evans <jacob@dekz.net>2017-11-23 12:14:33 +0800
commit924b96ce2af038a9635d5a19802b07698e19b056 (patch)
tree756bbdd73e9b5ee031a52599b8436ddc87f65862 /packages/0x.js/src
parent47236dbaecf9613fad470014a40785076cbd6d8a (diff)
downloaddexon-sol-tools-924b96ce2af038a9635d5a19802b07698e19b056.tar
dexon-sol-tools-924b96ce2af038a9635d5a19802b07698e19b056.tar.gz
dexon-sol-tools-924b96ce2af038a9635d5a19802b07698e19b056.tar.bz2
dexon-sol-tools-924b96ce2af038a9635d5a19802b07698e19b056.tar.lz
dexon-sol-tools-924b96ce2af038a9635d5a19802b07698e19b056.tar.xz
dexon-sol-tools-924b96ce2af038a9635d5a19802b07698e19b056.tar.zst
dexon-sol-tools-924b96ce2af038a9635d5a19802b07698e19b056.zip
Fix nits
Diffstat (limited to 'packages/0x.js/src')
-rw-r--r--packages/0x.js/src/order_watcher/remaining_fillable_calculator.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/0x.js/src/order_watcher/remaining_fillable_calculator.ts b/packages/0x.js/src/order_watcher/remaining_fillable_calculator.ts
index 30f79e786..c77d4428c 100644
--- a/packages/0x.js/src/order_watcher/remaining_fillable_calculator.ts
+++ b/packages/0x.js/src/order_watcher/remaining_fillable_calculator.ts
@@ -51,16 +51,15 @@ export class RemainingFillableCalculator {
}
}
private calculatePartiallyFillableMakerTokenAmount(): BigNumber {
- // The number of times the maker can fill the order, if each fill only required the transfer of a single
- // baseUnit of fee tokens.
// Given an order for 200 wei for 2 ZRXwei fee, find 100 wei for 1 ZRXwei. Order ratio is then 100:1
const orderToFeeRatio = this.signedOrder.makerTokenAmount.dividedBy(this.signedOrder.makerFee);
- // Maximum number of times the Maker can fill the order, given the fees
+ // The number of times the maker can fill the order, if each fill only required the transfer of a single
+ // baseUnit of fee tokens.
// Given 2 ZRXwei, the maximum amount of times Maker can fill this order, in terms of fees, is 2
const fillableTimesInFeeTokenBaseUnits = BigNumber.min(this.transferrableMakerFeeTokenAmount,
this.remainingMakerFeeAmount);
- // Maximum number of times the Maker can fill the order, given the Maker Token Balance
- // Assuming a balance of 150 wei, maker can fill this order 1 time.
+ // The number of times the Maker can fill the order, given the Maker Token Balance
+ // Assuming a balance of 150 wei, and an orderToFeeRatio of 100:1, maker can fill this order 1 time.
let fillableTimesInMakerTokenUnits = this.transferrableMakerTokenAmount.dividedBy(orderToFeeRatio);
if (this.isMakerTokenZRX) {
// If ZRX is the maker token, the Fee and the Maker amount need to be removed from the same pool;