removed unused functions
This commit is contained in:
parent
c8886febb9
commit
629d48c766
@ -1,7 +1,7 @@
|
|||||||
import { ContractAddresses } from '@0x/contract-addresses';
|
import { ContractAddresses } from '@0x/contract-addresses';
|
||||||
import { assetDataUtils, ERC20AssetData, generatePseudoRandomSalt, orderCalculationUtils } from '@0x/order-utils';
|
import { assetDataUtils, ERC20AssetData, generatePseudoRandomSalt, orderCalculationUtils } from '@0x/order-utils';
|
||||||
import { RFQTIndicativeQuote } from '@0x/quote-server';
|
import { RFQTIndicativeQuote } from '@0x/quote-server';
|
||||||
import { ERC20BridgeAssetData, SignedOrder } from '@0x/types';
|
import { SignedOrder } from '@0x/types';
|
||||||
import { AbiEncoder, BigNumber } from '@0x/utils';
|
import { AbiEncoder, BigNumber } from '@0x/utils';
|
||||||
|
|
||||||
import { MarketOperation, SignedOrderWithFillableAmounts } from '../../types';
|
import { MarketOperation, SignedOrderWithFillableAmounts } from '../../types';
|
||||||
@ -40,30 +40,6 @@ import {
|
|||||||
|
|
||||||
// tslint:disable completed-docs no-unnecessary-type-assertion
|
// 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(
|
export function createDummyOrderForSampler(
|
||||||
makerAssetData: string,
|
makerAssetData: string,
|
||||||
takerAssetData: string,
|
takerAssetData: string,
|
||||||
|
@ -265,23 +265,6 @@ describe('MarketOperationUtils tests', () => {
|
|||||||
return rates;
|
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;
|
const NUM_SAMPLES = 3;
|
||||||
|
|
||||||
interface RatesBySource {
|
interface RatesBySource {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user