diff --git a/api/available-routes.ts b/api/available-routes.ts index 471a558cc..78936306f 100644 --- a/api/available-routes.ts +++ b/api/available-routes.ts @@ -9,6 +9,7 @@ import { handleErrorCondition, DISABLED_CHAINS_FOR_AVAILABLE_ROUTES, DISABLED_TOKENS_FOR_AVAILABLE_ROUTES, + getSpokePoolAddress, } from "./_utils"; import { TypedVercelRequest } from "./_types"; @@ -49,6 +50,7 @@ const handler = async ( destinationToken: string; fromTokenSymbol: string; toTokenSymbol: string; + isNative: boolean; }) => ![route.originChainId, route.destinationChainId].some((chainId) => DISABLED_CHAINS_FOR_AVAILABLE_ROUTES.includes(String(chainId)) @@ -72,6 +74,9 @@ const handler = async ( fromTokenSymbol: route.fromTokenSymbol, toTokenSymbol: route.toTokenSymbol, destinationToken: route.toTokenAddress, + isNative: route.isNative, + originSpokePool: getSpokePoolAddress(route.fromChain), + destinationSpokePool: getSpokePoolAddress(route.toChain), }) ).map((route) => ({ originChainId: route.originChainId, @@ -80,6 +85,9 @@ const handler = async ( destinationToken: route.destinationToken, originTokenSymbol: route.fromTokenSymbol, destinationTokenSymbol: route.toTokenSymbol, + isNative: route.isNative, + originSpokePool: route.originSpokePool, + destinationSpokePool: route.destinationSpokePool, })); // Two different explanations for how `stale-while-revalidate` works: