added fix
This commit is contained in:
parent
83c942ad8c
commit
efef5f122f
@ -1,10 +1,11 @@
|
||||
import { ContractAddresses } from '@0x/contract-addresses';
|
||||
import { Web3Wrapper } from '@0x/dev-utils';
|
||||
import { RFQTIndicativeQuote } from '@0x/quote-server';
|
||||
import { SignedOrder } from '@0x/types';
|
||||
import { BigNumber, NULL_ADDRESS } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { MarketOperation } from '../../types';
|
||||
import { MarketOperation, Omit } from '../../types';
|
||||
import { QuoteRequestor } from '../quote_requestor';
|
||||
|
||||
import { generateQuoteReport, QuoteReport } from './../quote_report_generator';
|
||||
@ -28,7 +29,6 @@ import {
|
||||
import { findOptimalPathAsync } from './path_optimizer';
|
||||
import { DexOrderSampler, getSampleAmounts } from './sampler';
|
||||
import { SourceFilters } from './source_filters';
|
||||
import { Omit } from '../../types';
|
||||
import {
|
||||
AggregationError,
|
||||
DexSample,
|
||||
@ -42,7 +42,6 @@ import {
|
||||
OrderDomain,
|
||||
TokenAdjacencyGraph,
|
||||
} from './types';
|
||||
import { Web3Wrapper } from '@0x/dev-utils';
|
||||
|
||||
// tslint:disable:boolean-naming
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { Omit } from '../../types';
|
||||
|
||||
import { ZERO_AMOUNT } from './constants';
|
||||
import { getTwoHopAdjustedRate } from './fills';
|
||||
import { DexSample, FeeSchedule, MarketSideLiquidity, MultiHopFillData, TokenAdjacencyGraph } from './types';
|
||||
import { Omit } from '../../types';
|
||||
|
||||
/**
|
||||
* Given a token pair, returns the intermediate tokens to consider for two-hop routes.
|
||||
|
@ -725,7 +725,7 @@ describe('MarketOperationUtils tests', () => {
|
||||
TypeMoq.It.isAny(),
|
||||
TypeMoq.It.isAny(),
|
||||
TypeMoq.It.isAny(),
|
||||
)
|
||||
),
|
||||
).callback((
|
||||
_makerAssetData: string,
|
||||
_takerAssetData: string,
|
||||
@ -763,7 +763,7 @@ describe('MarketOperationUtils tests', () => {
|
||||
TypeMoq.It.isAny(),
|
||||
TypeMoq.It.isAny(),
|
||||
TypeMoq.It.isAny(),
|
||||
)
|
||||
),
|
||||
).returns(async () => {
|
||||
return {
|
||||
dexQuotes: [],
|
||||
@ -788,7 +788,7 @@ describe('MarketOperationUtils tests', () => {
|
||||
makerTokenDecimals: 6,
|
||||
takerTokenDecimals: 18,
|
||||
};
|
||||
})
|
||||
});
|
||||
const result = await mockedMarketOpUtils.object.getMarketSellOrdersAsync(ORDERS, Web3Wrapper.toBaseUnitAmount(1, 18), {
|
||||
...DEFAULT_OPTS,
|
||||
rfqt: {
|
||||
@ -799,10 +799,10 @@ describe('MarketOperationUtils tests', () => {
|
||||
quoteRequestor: {
|
||||
requestRfqtFirmQuotesAsync: mockedQuoteRequestor.object.requestRfqtFirmQuotesAsync,
|
||||
} as any,
|
||||
}
|
||||
},
|
||||
});
|
||||
expect(result.optimizedOrders.length).to.eql(1);
|
||||
expect(requestedComparisonPrice!.toString()).to.eql("0.003125");
|
||||
expect(requestedComparisonPrice!.toString()).to.eql('0.003125');
|
||||
expect(result.optimizedOrders[0].makerAssetAmount.toString()).to.eql('321000000');
|
||||
expect(result.optimizedOrders[0].takerAssetAmount.toString()).to.eql('1000000000000000000');
|
||||
});
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { randomAddress } from '@0x/contracts-test-utils';
|
||||
import { tokenUtils } from '@0x/dev-utils';
|
||||
import { assetDataUtils } from '@0x/order-utils';
|
||||
import { StatusCodes } from '@0x/types';
|
||||
|
Loading…
x
Reference in New Issue
Block a user