Skip to content

Commit ab184c5

Browse files
committed
clean up
1 parent 1aedf31 commit ab184c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/swapService/runner.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function loadPipeline(swapParams: SwapParams) {
2525
return routing.map((routingItem: RoutingItem) => {
2626
return new strategies[routingItem.strategy](
2727
routingItem.match,
28-
routingItem?.config,
28+
routingItem.config,
2929
)
3030
})
3131
}
@@ -36,8 +36,8 @@ export async function runPipeline(
3636
const pipeline = loadPipeline(swapParams)
3737

3838
const allResults: StrategyResult[] = []
39-
for (let i = 0; i < pipeline.length; i++) {
40-
const result = await pipeline[i].findSwap(swapParams)
39+
for (const strategy of pipeline) {
40+
const result = await strategy.findSwap(swapParams)
4141
allResults.push(result)
4242
if (result.response) break
4343
}

0 commit comments

Comments
 (0)