From 7f0c01f0e9e995625f070fdd34136b5b074bb504 Mon Sep 17 00:00:00 2001 From: Srdjan S Date: Thu, 5 Feb 2026 14:59:17 +0100 Subject: [PATCH 1/2] chore: add missing gasSpent property to quote result --- src/evm/api/quote.test.ts | 10 ++++++++++ src/evm/api/quote.ts | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/evm/api/quote.test.ts b/src/evm/api/quote.test.ts index 9d68624a..9eacba80 100644 --- a/src/evm/api/quote.test.ts +++ b/src/evm/api/quote.test.ts @@ -32,6 +32,16 @@ describe('getQuote', () => { } }) + it('should return gasSpent as a number on success', async () => { + const result = await getQuote(baseQuoteRequest) + + expect(result.status).toBe('Success') + if (result.status === 'Success') { + expect(result.gasSpent).toBeTypeOf('number') + expect(result.gasSpent).toBeGreaterThan(0) + } + }) + it.skip('should return a quote when url is set to staging', async () => { const result = await getQuote({ ...baseQuoteRequest, diff --git a/src/evm/api/quote.ts b/src/evm/api/quote.ts index 74ddbc5f..53a5c7d0 100644 --- a/src/evm/api/quote.ts +++ b/src/evm/api/quote.ts @@ -40,6 +40,8 @@ function quoteResponseSchema(visualize?: Visualize) { amountIn: z.string(), assumedAmountOut: z.string(), + + gasSpent: z.number(), }) .transform((data) => ({ ...data, From 0015448e906fb69d6654982c11c70002f069ca50 Mon Sep 17 00:00:00 2001 From: Srdjan S Date: Thu, 5 Feb 2026 15:03:31 +0100 Subject: [PATCH 2/2] chore: add changeset --- .changeset/large-melons-nail.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/large-melons-nail.md diff --git a/.changeset/large-melons-nail.md b/.changeset/large-melons-nail.md new file mode 100644 index 00000000..ac208c37 --- /dev/null +++ b/.changeset/large-melons-nail.md @@ -0,0 +1,5 @@ +--- +"sushi": patch +--- + +Adds missing `gasSpent` property to the `getQuote` result