Add labels to TODOs

This commit is contained in:
fragosti
2018-09-21 14:56:54 +02:00
parent fcca63a2dc
commit 97150cf55f
2 changed files with 5 additions and 4 deletions

View File

@@ -3,9 +3,10 @@ import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash';
import { constants } from '../constants';
import { orderUtils } from './order_utils';
import { AssetBuyerError, AssetBuyerOrdersAndFillableAmounts, BuyQuote } from '../types';
import { orderUtils } from './order_utils';
export const buyQuoteCalculator = {
calculate(
ordersAndFillableAmounts: AssetBuyerOrdersAndFillableAmounts,

View File

@@ -41,9 +41,9 @@ export const orderFetcherResponseProcessor = {
let unsortedFeeOrders = filteredFeeOrders;
// if an orderValidator is provided, use on chain information to calculate remaining fillable makerAsset amounts
if (!_.isUndefined(orderValidator)) {
// TODO: critical
// TODO(bmillman): improvement
// try catch these requests and throw a more domain specific error
// TODO: optimization
// TODO(bmillman): optimization
// reduce this to once RPC call buy combining orders into one array and then splitting up the response
const [targetOrdersAndTradersInfo, feeOrdersAndTradersInfo] = await Promise.all(
_.map([filteredTargetOrders, filteredFeeOrders], ordersToBeValidated => {
@@ -65,7 +65,7 @@ export const orderFetcherResponseProcessor = {
);
}
// sort orders by rate
// TODO: optimization
// TODO(bmillman): optimization
// provide a feeRate to the sorting function to more accurately sort based on the current market for ZRX tokens
const sortedTargetOrders = sortingUtils.sortOrdersByFeeAdjustedRate(unsortedTargetOrders);
const sortedFeeOrders = sortingUtils.sortFeeOrdersByFeeAdjustedRate(unsortedFeeOrders);