Skip to content

Commit

Permalink
Add tripaths to routeProposer.
Browse files Browse the repository at this point in the history
  • Loading branch information
johngrantuk committed Aug 9, 2023
1 parent 6244745 commit 76363a9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/routeProposal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
SorConfig,
PoolDictionary,
} from '../types';
import { getTriPaths } from './triPaths';

export class RouteProposer {
cache: Record<string, { paths: NewPath[] }> = {};
Expand Down Expand Up @@ -79,9 +80,17 @@ export class RouteProposer {
this.config
);

const triPaths = getTriPaths(
tokenIn,
tokenOut,
poolsAllDict,
this.config.triPathMidPoolIds ?? []
);

const combinedPathData = pathData
.concat(...boostedPaths)
.concat(...pathsUsingStaBal);
.concat(...pathsUsingStaBal)
.concat(...triPaths);
const [paths] = calculatePathLimits(combinedPathData, swapType);

this.cache[`${tokenIn}${tokenOut}${swapType}${swapOptions.timestamp}`] =
Expand Down

0 comments on commit 76363a9

Please sign in to comment.