Skip to content

Commit 28d28ae

Browse files
committed
fix: update step fromAmount using output of the previous step execution (#188)
1 parent 1574d5c commit 28d28ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/execution/RouteExecutionManager.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ export class RouteExecutionManager {
142142
// Update amount using output of previous execution. In the future this should be handled by calling `updateRoute`
143143
if (previousStep?.execution?.toAmount) {
144144
step.action.fromAmount = previousStep.execution.toAmount
145+
if (step.includedSteps?.length) {
146+
step.includedSteps[0].action.fromAmount =
147+
previousStep.execution.toAmount
148+
}
145149
}
146150

147151
try {

0 commit comments

Comments
 (0)