diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-10-04 14:22:38 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-10-04 14:22:38 +0800 |
commit | 24e0fbd7b9debcfd193f9174f0254d7d5ae22c12 (patch) | |
tree | 52810915b376c27507256f71d12cd62e53c5374f /packages | |
parent | 059162a90a3d26e5fdfefd8553bb1f721a3116fc (diff) | |
download | dexon-sol-tools-24e0fbd7b9debcfd193f9174f0254d7d5ae22c12.tar dexon-sol-tools-24e0fbd7b9debcfd193f9174f0254d7d5ae22c12.tar.gz dexon-sol-tools-24e0fbd7b9debcfd193f9174f0254d7d5ae22c12.tar.bz2 dexon-sol-tools-24e0fbd7b9debcfd193f9174f0254d7d5ae22c12.tar.lz dexon-sol-tools-24e0fbd7b9debcfd193f9174f0254d7d5ae22c12.tar.xz 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.ts | 8 |
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', () => { |