Skip to content

Commit d4d5f8f

Browse files
kaladinlightclaude
andcommitted
fix(public-api): supply supportsEIP1559 on evm rate inputs
GetEvmTradeRateInput pins supportsEIP1559: false and swappers discriminate evm from solana inputs on its presence - the rates endpoint omitted it, so bebop routed evm pairs to its solana implementation and errored with "Bebop Solana quote not executable: undefined". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent e02d0db commit d4d5f8f

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎packages/public-api/src/routes/rates/getRates.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { isEvmChainId } from '@shapeshiftoss/chain-adapters'
12
import type { GetTradeRateInput } from '@shapeshiftoss/swapper'
23
import { getTradeRates, swappers, TradeQuoteError } from '@shapeshiftoss/swapper'
34
import type { Request, Response } from 'express'
@@ -84,6 +85,7 @@ export const getRates = async (req: Request, res: Response): Promise<void> => {
8485
accountNumber: undefined,
8586
quoteOrRate: 'rate' as const,
8687
chainId: sellAsset.chainId,
88+
...(isEvmChainId(sellAsset.chainId) && { supportsEIP1559: false as const }),
8789
}
8890

8991
const ratePromises = ENABLED_SWAPPER_NAMES.map(async (swapperName): Promise<ApiRate | null> => {

‎packages/swapper/src/swappers/ButterSwap/utils/getButterSwapStepData.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ export function getButterSwapStepData(
6969
export async function getButterSwapStepData(
7070
args: GetButterSwapStepDataArgs,
7171
): Promise<Result<ButterSwapRateStepData | ButterSwapQuoteStepData, SwapErrorRight>> {
72-
const { input, route, sellAsset, feeAsset, sellAmountCryptoBaseUnit, spenderAddress, deps } =
73-
args
72+
const { input, route, sellAsset, feeAsset, sellAmountCryptoBaseUnit, spenderAddress, deps } = args
7473
const { chainNamespace, chainReference } = fromChainId(sellAsset.chainId)
7574

7675
switch (chainNamespace) {

0 commit comments

Comments
 (0)