We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1aedf31 commit ab184c5Copy full SHA for ab184c5
src/swapService/runner.ts
@@ -25,7 +25,7 @@ function loadPipeline(swapParams: SwapParams) {
25
return routing.map((routingItem: RoutingItem) => {
26
return new strategies[routingItem.strategy](
27
routingItem.match,
28
- routingItem?.config,
+ routingItem.config,
29
)
30
})
31
}
@@ -36,8 +36,8 @@ export async function runPipeline(
36
const pipeline = loadPipeline(swapParams)
37
38
const allResults: StrategyResult[] = []
39
- for (let i = 0; i < pipeline.length; i++) {
40
- const result = await pipeline[i].findSwap(swapParams)
+ for (const strategy of pipeline) {
+ const result = await strategy.findSwap(swapParams)
41
allResults.push(result)
42
if (result.response) break
43
0 commit comments