Skip to content

Commit

Permalink
Merge pull request #221 from Uniswap/fix-quote-id
Browse files Browse the repository at this point in the history
fix: new quote id get generated after quote response
  • Loading branch information
ConjunctiveNormalForm authored Oct 30, 2023
2 parents 7c9283a + 31315ec commit a209202
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions lib/entities/QuoteResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { BigNumber } from 'ethers';
import { ValidationResult } from 'joi';
import { v4 as uuidv4 } from 'uuid';

import { QuoteRequestData } from '.';
import { PostQuoteResponse, RfqResponse, RfqResponseJoi } from '../handlers/quote/schema';
import { currentTimestampInMs, timestampInMstoSeconds } from '../util/time';
import { QuoteRequestData } from '.';

export interface QuoteResponseData
extends Omit<QuoteRequestData, 'tokenInChainId' | 'tokenOutChainId' | 'amount' | 'type' | 'numOutputs'> {
Expand Down Expand Up @@ -52,7 +52,6 @@ export class QuoteResponse implements QuoteResponseData {
{
...data,
swapper: request.swapper,
quoteId: request.quoteId ?? uuidv4(),
amountIn: BigNumber.from(data.amountIn ?? 0),
amountOut: BigNumber.from(data.amountOut ?? 0),
},
Expand Down
1 change: 1 addition & 0 deletions lib/handlers/quote/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,6 @@ export type RfqResponse = {
amountIn: string;
tokenOut: string;
amountOut: string;
quoteId: string;
filler?: string;
};

0 comments on commit a209202

Please sign in to comment.