Skip to content

Commit

Permalink
Merge pull request #398 from Uniswap/remove-filler-num-filter
Browse files Browse the repository at this point in the history
chore: remove filler num filter
  • Loading branch information
ConjunctiveNormalForm authored Feb 12, 2025
2 parents 0ac3b86 + 5d7f29b commit 5859de8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
6 changes: 0 additions & 6 deletions lib/handlers/quote/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Logger from 'bunyan';
import Joi from 'joi';

import { Metric, QuoteRequest, QuoteResponse } from '../../entities';
import { ProtocolVersion } from '../../providers';
import { Quoter } from '../../quoters';
import { NoQuotesAvailable } from '../../util/errors';
import { timestampInMstoSeconds } from '../../util/time';
Expand Down Expand Up @@ -108,11 +107,6 @@ export async function getBestQuote(
break;
}

// don't use X if less than 2 fillers show up in soft quote
if (responses.length < 2 && quoteRequest.protocol == ProtocolVersion.V2) {
return null;
}

// return the response with the highest amountOut value
return responses.reduce((bestQuote: QuoteResponse | null, quote: QuoteResponse) => {
log.info({
Expand Down
14 changes: 0 additions & 14 deletions test/handlers/quote/handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,20 +144,6 @@ describe('Quote handler', () => {
).toMatchObject({ ...quoteResponse, quoteId: expect.any(String) });
});

it('Returns no soft quote in V2 if less than two fillers show up', async () => {
const quoters = [new MockQuoter(logger, 1, 1)];
const request = getRequest('1', 'EXACT_INPUT', ProtocolVersion.V2);
const response = await getQuoteHandler(quoters).handler(getEvent(request), {} as unknown as Context);
expect(response.statusCode).toEqual(404);
const quoteResponse: PostQuoteResponse = JSON.parse(response.body);
expect(quoteResponse).toMatchObject(
expect.objectContaining({
errorCode: 'QUOTE_ERROR',
detail: 'No quotes available',
})
);
});

it('Pick the greater of two quotes - EXACT_IN', async () => {
const quoters = [new MockQuoter(logger, 1, 1), new MockQuoter(logger, 2, 1)];
const amountIn = ethers.utils.parseEther('1');
Expand Down

0 comments on commit 5859de8

Please sign in to comment.