diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-10-24 06:32:55 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-10-24 06:32:55 +0800 |
commit | da54fc3296c46c92bfbe264ae02e70055f1085fd (patch) | |
tree | 640565d3e7c0b04d18116951a2471102e54342ed /packages/asset-buyer/src/utils | |
parent | 4db33ba2b37f4682ecae5da325e631d546a8a24e (diff) | |
download | dexon-sol-tools-da54fc3296c46c92bfbe264ae02e70055f1085fd.tar dexon-sol-tools-da54fc3296c46c92bfbe264ae02e70055f1085fd.tar.gz dexon-sol-tools-da54fc3296c46c92bfbe264ae02e70055f1085fd.tar.bz2 dexon-sol-tools-da54fc3296c46c92bfbe264ae02e70055f1085fd.tar.lz dexon-sol-tools-da54fc3296c46c92bfbe264ae02e70055f1085fd.tar.xz dexon-sol-tools-da54fc3296c46c92bfbe264ae02e70055f1085fd.tar.zst dexon-sol-tools-da54fc3296c46c92bfbe264ae02e70055f1085fd.zip |
chore(asset-buyer): fix lint errors
Diffstat (limited to 'packages/asset-buyer/src/utils')
-rw-r--r-- | packages/asset-buyer/src/utils/buy_quote_calculator.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/asset-buyer/src/utils/buy_quote_calculator.ts b/packages/asset-buyer/src/utils/buy_quote_calculator.ts index 33cbea4a6..f94ab3fa4 100644 --- a/packages/asset-buyer/src/utils/buy_quote_calculator.ts +++ b/packages/asset-buyer/src/utils/buy_quote_calculator.ts @@ -1,4 +1,4 @@ -import { marketUtils, rateUtils, SignedOrder } from '@0x/order-utils'; +import { marketUtils, SignedOrder } from '@0x/order-utils'; import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; @@ -151,7 +151,7 @@ function findEthAmountNeededToBuyZrx( (acc, order, index) => { const { totalEthAmount, remainingZrxBuyAmount } = acc; const remainingFillableMakerAssetAmount = remainingFillableMakerAssetAmounts[index]; - const makerFillAmount = BigNumber.min(acc.remainingZrxBuyAmount, remainingFillableMakerAssetAmount); + const makerFillAmount = BigNumber.min(remainingZrxBuyAmount, remainingFillableMakerAssetAmount); const [takerFillAmount, adjustedMakerFillAmount] = orderUtils.getTakerFillAmountForFeeOrder( order, makerFillAmount, @@ -163,7 +163,7 @@ function findEthAmountNeededToBuyZrx( totalEthAmount: totalEthAmount.plus(takerFillAmount), remainingZrxBuyAmount: BigNumber.max( constants.ZERO_AMOUNT, - acc.remainingZrxBuyAmount.minus(makerFillAmount).plus(extraFeeAmount), + remainingZrxBuyAmount.minus(makerFillAmount).plus(extraFeeAmount), ), }; }, |