Skip to content

Commit

Permalink
only mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
xrsv committed Nov 19, 2024
1 parent 5dd3e2a commit 81faa89
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/routers/alpha-router/functions/get-candidate-pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -992,13 +992,16 @@ export async function getV3CandidatePools({
.value();

if (top2DirectSwapPool.length == 0 && topNDirectSwaps > 0) {
// We don't want to re-add AMPL token pools for V3.
// We don't want to re-add AMPL token pools for V3 in Mainnet.
// TODO: ROUTE-347, Remove this check once we have a better way to sync filters from subgraph cronjob <> routing path.
if (
tokenIn.address.toLowerCase() !==
'0xd46ba6d942050d489dbd938a2c909a5d5039a161' &&
tokenOut.address.toLowerCase() !==
'0xd46ba6d942050d489dbd938a2c909a5d5039a161'
!(
chainId == ChainId.MAINNET &&
(tokenIn.address.toLowerCase() ===
'0xd46ba6d942050d489dbd938a2c909a5d5039a161' ||
tokenOut.address.toLowerCase() ===
'0xd46ba6d942050d489dbd938a2c909a5d5039a161')
)
) {
// If we requested direct swap pools but did not find any in the subgraph query.
// Optimistically add them into the query regardless. Invalid pools ones will be dropped anyway
Expand Down

0 comments on commit 81faa89

Please sign in to comment.