Skip to content

Commit

Permalink
fix: active step indicator for hops without allowance approval
Browse files Browse the repository at this point in the history
  • Loading branch information
woodenfurniture committed Nov 21, 2023
1 parent d5621c8 commit 2a30875
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,13 @@ export const Hop = ({
return hopIndex === 0 ? 1 : 0
case HopExecutionState.AwaitingTradeConfirmation:
case HopExecutionState.AwaitingTradeExecution:
if (isApprovalInitiallyNeeded) {
return hopIndex === 0 ? 2 : 1
} else {
return hopIndex === 0 ? 1 : 0
}
return hopIndex === 0 ? 2 : 1
case HopExecutionState.Complete:
return Infinity
default:
assertUnreachable(hopExecutionState)
}
}, [hopExecutionState, hopIndex, isApprovalInitiallyNeeded])
}, [hopExecutionState, hopIndex])

const slippageDecimalPercentage = useMemo(
() => getDefaultSlippageDecimalPercentageForSwapper(swapperName),
Expand Down

0 comments on commit 2a30875

Please sign in to comment.