aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-10-04 14:22:38 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-10-04 14:22:38 +0800
commit24e0fbd7b9debcfd193f9174f0254d7d5ae22c12 (patch)
tree52810915b376c27507256f71d12cd62e53c5374f /packages
parent059162a90a3d26e5fdfefd8553bb1f721a3116fc (diff)
downloaddexon-sol-tools-24e0fbd7b9debcfd193f9174f0254d7d5ae22c12.tar.gz
dexon-sol-tools-24e0fbd7b9debcfd193f9174f0254d7d5ae22c12.tar.zst
dexon-sol-tools-24e0fbd7b9debcfd193f9174f0254d7d5ae22c12.zip
Add fee order with a takerFee
Diffstat (limited to 'packages')
-rw-r--r--packages/asset-buyer/test/buy_quote_calculator_test.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/asset-buyer/test/buy_quote_calculator_test.ts b/packages/asset-buyer/test/buy_quote_calculator_test.ts
index 3bd0f8d4e..0108dfcc6 100644
--- a/packages/asset-buyer/test/buy_quote_calculator_test.ts
+++ b/packages/asset-buyer/test/buy_quote_calculator_test.ts
@@ -52,12 +52,16 @@ describe('buyQuoteCalculator', () => {
remainingFillableMakerAssetAmounts: [smallFeeOrder.makerAssetAmount],
};
const largeFeeOrder = orderFactory.createSignedOrderFromPartial({
- makerAssetAmount: new BigNumber(100),
+ makerAssetAmount: new BigNumber(110),
takerAssetAmount: new BigNumber(200),
+ takerFee: new BigNumber(10),
});
allFeeOrdersAndFillableAmounts = {
orders: [smallFeeOrder, largeFeeOrder],
- remainingFillableMakerAssetAmounts: [smallFeeOrder.makerAssetAmount, largeFeeOrder.makerAssetAmount],
+ remainingFillableMakerAssetAmounts: [
+ smallFeeOrder.makerAssetAmount,
+ largeFeeOrder.makerAssetAmount.minus(largeFeeOrder.takerFee),
+ ],
};
});
it('should throw if not enough maker asset liquidity', () => {