diff --git a/src/api/quoter/quote/quote.ts b/src/api/quoter/quote/quote.ts index 6a42d00..b2dc896 100644 --- a/src/api/quoter/quote/quote.ts +++ b/src/api/quoter/quote/quote.ts @@ -39,6 +39,8 @@ export class Quote { public readonly quoteId: string | null + public readonly silippage: number + constructor( private readonly params: QuoterRequest, response: QuoterResponse @@ -59,6 +61,7 @@ export class Quote { this.quoteId = response.quoteId this.whitelist = response.whitelist.map((a) => new Address(a)) this.recommendedPreset = response.recommended_preset + this.silippage = response.autoK this.settlementAddress = new Address(response.settlementAddress) } diff --git a/src/api/quoter/quoter.api.spec.ts b/src/api/quoter/quoter.api.spec.ts index 7e2bb8d..7175aa7 100644 --- a/src/api/quoter/quoter.api.spec.ts +++ b/src/api/quoter/quoter.api.spec.ts @@ -29,6 +29,7 @@ describe('Quoter API', () => { const ResponseMock = { fromTokenAmount: '1000000000000000000000', recommended_preset: PresetEnum.medium, + autoK: 5.5, feeToken: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', presets: { fast: { diff --git a/src/api/quoter/types.ts b/src/api/quoter/types.ts index c6afbc3..0e1b878 100644 --- a/src/api/quoter/types.ts +++ b/src/api/quoter/types.ts @@ -33,6 +33,7 @@ export type QuoterResponse = { settlementAddress: string whitelist: string[] quoteId: string | null + autoK: number } export type QuoterPresets = {