diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-24 01:12:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-24 01:12:39 +0800 |
commit | 6e27324a341801e1a2d8d6989d749dfe021ae39b (patch) | |
tree | 32b2e1d93958905f7e4d0529e4fbead4206275ab /packages/order-utils/src/market_utils.ts | |
parent | b013cf2e145825a9e250c61bc77825384b2af69e (diff) | |
parent | 8eb4b6f91791313dc02865a9dd3324cce646d537 (diff) | |
download | dexon-sol-tools-6e27324a341801e1a2d8d6989d749dfe021ae39b.tar dexon-sol-tools-6e27324a341801e1a2d8d6989d749dfe021ae39b.tar.gz dexon-sol-tools-6e27324a341801e1a2d8d6989d749dfe021ae39b.tar.bz2 dexon-sol-tools-6e27324a341801e1a2d8d6989d749dfe021ae39b.tar.lz dexon-sol-tools-6e27324a341801e1a2d8d6989d749dfe021ae39b.tar.xz dexon-sol-tools-6e27324a341801e1a2d8d6989d749dfe021ae39b.tar.zst dexon-sol-tools-6e27324a341801e1a2d8d6989d749dfe021ae39b.zip |
Merge pull request #924 from 0xProject/wrap-typedoc
Improved Docs & Removed monorepo-scripts from packages
Diffstat (limited to 'packages/order-utils/src/market_utils.ts')
-rw-r--r-- | packages/order-utils/src/market_utils.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/order-utils/src/market_utils.ts b/packages/order-utils/src/market_utils.ts index a0a827546..441c50e5c 100644 --- a/packages/order-utils/src/market_utils.ts +++ b/packages/order-utils/src/market_utils.ts @@ -5,7 +5,12 @@ import * as _ from 'lodash'; import { assert } from './assert'; import { constants } from './constants'; -import { FindFeeOrdersThatCoverFeesForTargetOrdersOpts, FindOrdersThatCoverMakerAssetFillAmountOpts } from './types'; +import { + FeeOrdersAndRemainingFeeAmount, + FindFeeOrdersThatCoverFeesForTargetOrdersOpts, + FindOrdersThatCoverMakerAssetFillAmountOpts, + OrdersAndRemainingFillAmount, +} from './types'; export const marketUtils = { /** @@ -22,7 +27,7 @@ export const marketUtils = { orders: T[], makerAssetFillAmount: BigNumber, opts?: FindOrdersThatCoverMakerAssetFillAmountOpts, - ): { resultOrders: T[]; remainingFillAmount: BigNumber } { + ): OrdersAndRemainingFillAmount<T> { assert.doesConformToSchema('orders', orders, schemas.ordersSchema); assert.isValidBaseUnitAmount('makerAssetFillAmount', makerAssetFillAmount); // try to get remainingFillableMakerAssetAmounts from opts, if it's not there, use makerAssetAmount values from orders @@ -84,7 +89,7 @@ export const marketUtils = { orders: T[], feeOrders: T[], opts?: FindFeeOrdersThatCoverFeesForTargetOrdersOpts, - ): { resultOrders: T[]; remainingFeeAmount: BigNumber } { + ): FeeOrdersAndRemainingFeeAmount<T> { assert.doesConformToSchema('orders', orders, schemas.ordersSchema); assert.doesConformToSchema('feeOrders', feeOrders, schemas.ordersSchema); // try to get remainingFillableMakerAssetAmounts from opts, if it's not there, use makerAssetAmount values from orders |