diff options
author | Jacob Evans <jacob@dekz.net> | 2017-11-21 12:00:09 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2017-11-21 12:00:09 +0800 |
commit | 335b9629b85ac394afc7afb649de29ee608764b5 (patch) | |
tree | 0d8d7cfa4703d4ceb35b9f1ed9c195df5c3d21d0 | |
parent | d16f0508bdae9941a0eb5e042bbade5078da1c00 (diff) | |
download | dexon-sol-tools-335b9629b85ac394afc7afb649de29ee608764b5.tar.gz dexon-sol-tools-335b9629b85ac394afc7afb649de29ee608764b5.tar.zst dexon-sol-tools-335b9629b85ac394afc7afb649de29ee608764b5.zip |
calculatedFillableAmountPlusFees
-rw-r--r-- | packages/0x.js/test/remaining_fillable_calculator_test.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/0x.js/test/remaining_fillable_calculator_test.ts b/packages/0x.js/test/remaining_fillable_calculator_test.ts index 5b7fd63f1..ca541237f 100644 --- a/packages/0x.js/test/remaining_fillable_calculator_test.ts +++ b/packages/0x.js/test/remaining_fillable_calculator_test.ts @@ -122,15 +122,15 @@ describe.only('RemainingFillableCalculator', () => { transferrableMakerFeeTokenAmount = transferrableMakerTokenAmount; const orderToFeeRatio = signedOrder.makerTokenAmount.dividedToIntegerBy(signedOrder.makerFee); - const expectedRemainingAmount = new BigNumber(450950); - const numberOfFillsInRatio = expectedRemainingAmount.dividedToIntegerBy(orderToFeeRatio); + const expectedFillableAmount = new BigNumber(450950); + const numberOfFillsInRatio = expectedFillableAmount.dividedToIntegerBy(orderToFeeRatio); calculator = new RemainingFillableCalculator(signedOrder, isMakerTokenZRX, transferrableMakerTokenAmount, transferrableMakerFeeTokenAmount, remainingMakerTokenAmount); - const calculatedRemainingAmount = calculator.computeRemainingMakerFillable(); - const calculatedRemainingAmountPlusFees = calculatedRemainingAmount.plus(numberOfFillsInRatio); - expect(calculatedRemainingAmount).to.be.bignumber.equal(expectedRemainingAmount); - expect(calculatedRemainingAmountPlusFees).to.be.bignumber.lessThan(transferrableMakerTokenAmount); - expect(calculatedRemainingAmountPlusFees).to.be.bignumber.lessThan(remainingMakerTokenAmount); + const calculatedFillableAmount = calculator.computeRemainingMakerFillable(); + const calculatedFillableAmountPlusFees = calculatedFillableAmount.plus(numberOfFillsInRatio); + expect(calculatedFillableAmount).to.be.bignumber.equal(expectedFillableAmount); + expect(calculatedFillableAmountPlusFees).to.be.bignumber.lessThan(transferrableMakerTokenAmount); + expect(calculatedFillableAmountPlusFees).to.be.bignumber.lessThan(remainingMakerTokenAmount); }); }); }); |