Skip to content

Commit 50e10b8

Browse files
authored
Revert "fix: manually filter out fantom cached routes (#712)" (#713)
This reverts commit 3f68d2e.
1 parent 3f68d2e commit 50e10b8

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

lib/handlers/router-entities/route-caching/dynamo-route-caching-provider.ts

+1-20
Original file line numberDiff line numberDiff line change
@@ -217,28 +217,9 @@ export class DynamoRouteCachingProvider extends IRouteCachingProvider {
217217
cachedRoutes.routes.forEach((cachedRoute) => {
218218
// we use the stringified route as identifier
219219
const routeId = routeToString(cachedRoute.route)
220-
221-
const routeHasNoFATMOM =
222-
cachedRoute.protocol === Protocol.V2 &&
223-
(cachedRoute.route as V2Route).chainId === ChainId.MAINNET &&
224-
// either one of the below two conditions should allow us to filter out v2 route containing FATMOM,
225-
// we use both to be extra certain we can filter out
226-
((cachedRoute.route as V2Route).path.find(
227-
(token) => token.address !== '0xe4b48B6bbAFcA1F82Ad2976E30A81c800C249Aa3'
228-
) ||
229-
(cachedRoute.route as V2Route).pairs.find(
230-
(pair) =>
231-
pair.token0.address !== '0xe4b48B6bbAFcA1F82Ad2976E30A81c800C249Aa3' ||
232-
pair.token1.address !== '0xe4b48B6bbAFcA1F82Ad2976E30A81c800C249Aa3'
233-
))
234-
235-
if (!routeHasNoFATMOM) {
236-
log.warn(`Route ${routeId} has FATMOM, skipping. This is a temporary fix.`)
237-
}
238-
239220
// Using a map to remove duplicates, we will the different percents of different routes.
240221
// We also filter by protocol, in case we are loading a route from a protocol that wasn't requested
241-
if (!routesMap.has(routeId) && protocols.includes(cachedRoute.protocol) && routeHasNoFATMOM) {
222+
if (!routesMap.has(routeId) && protocols.includes(cachedRoute.protocol)) {
242223
routesMap.set(routeId, cachedRoute)
243224
}
244225
})

0 commit comments

Comments
 (0)