aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src/market_utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/order-utils/src/market_utils.ts')
-rw-r--r--packages/order-utils/src/market_utils.ts11
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..b3f302dd2 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 {
+ FindFeeOrdersThatCoverFeesForTargetOrdersOpts,
+ FindOrdersThatCoverMakerAssetFillAmountOpts,
+ FeeOrdersAndRemainingFeeAmount,
+ 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