Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): add spoke pool addresses to available-routes #1205

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api/available-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,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))
Expand All @@ -72,6 +73,7 @@ const handler = async (
fromTokenSymbol: route.fromTokenSymbol,
toTokenSymbol: route.toTokenSymbol,
destinationToken: route.toTokenAddress,
isNative: route.isNative,
})
).map((route) => ({
originChainId: route.originChainId,
Expand All @@ -80,6 +82,7 @@ const handler = async (
destinationToken: route.destinationToken,
originTokenSymbol: route.fromTokenSymbol,
destinationTokenSymbol: route.toTokenSymbol,
isNative: route.isNative,
}));

// Two different explanations for how `stale-while-revalidate` works:
Expand Down
1 change: 1 addition & 0 deletions api/suggested-fees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ const handler = async (
exclusiveRelayer,
exclusivityDeadline,
spokePoolAddress: getSpokePoolAddress(Number(computedOriginChainId)),
destinationSpokePoolAddress: getSpokePoolAddress(destinationChainId),
// Note: v3's new fee structure. Below are the correct values for the new fee structure. The above `*Pct` and `*Total`
// values are for backwards compatibility which will be removed in the future.
totalRelayFee: {
Expand Down
Loading