removed unused functions

This commit is contained in:
Alex Kroeger 2020-10-07 14:30:30 -07:00
parent c8886febb9
commit 629d48c766
2 changed files with 1 additions and 42 deletions

View File

@ -1,7 +1,7 @@
import { ContractAddresses } from '@0x/contract-addresses';
import { assetDataUtils, ERC20AssetData, generatePseudoRandomSalt, orderCalculationUtils } from '@0x/order-utils';
import { RFQTIndicativeQuote } from '@0x/quote-server';
import { ERC20BridgeAssetData, SignedOrder } from '@0x/types';
import { SignedOrder } from '@0x/types';
import { AbiEncoder, BigNumber } from '@0x/utils';
import { MarketOperation, SignedOrderWithFillableAmounts } from '../../types';
@ -40,30 +40,6 @@ import {
// tslint:disable completed-docs no-unnecessary-type-assertion
interface DexForwaderBridgeData {
inputToken: string;
calls: Array<{
target: string;
inputTokenAmount: BigNumber;
outputTokenAmount: BigNumber;
bridgeData: string;
}>;
}
const dexForwarderBridgeDataEncoder = AbiEncoder.create([
{ name: 'inputToken', type: 'address' },
{
name: 'calls',
type: 'tuple[]',
components: [
{ name: 'target', type: 'address' },
{ name: 'inputTokenAmount', type: 'uint256' },
{ name: 'outputTokenAmount', type: 'uint256' },
{ name: 'bridgeData', type: 'bytes' },
],
},
]);
export function createDummyOrderForSampler(
makerAssetData: string,
takerAssetData: string,

View File

@ -265,23 +265,6 @@ describe('MarketOperationUtils tests', () => {
return rates;
}
function getSortedOrderSources(side: MarketOperation, orders: OptimizedMarketOrder[]): ERC20BridgeSource[][] {
return (
orders
// Sort fills by descending rate.
.map(o => {
return o.fills
.slice()
.sort((a, b) =>
side === MarketOperation.Sell
? b.output.div(b.input).comparedTo(a.output.div(a.input))
: b.input.div(b.output).comparedTo(a.input.div(a.output)),
)
.map(f => f.source);
})
);
}
const NUM_SAMPLES = 3;
interface RatesBySource {