From 2a308755a98c94d089c3ab55ccb4777b39d8bd0a Mon Sep 17 00:00:00 2001 From: woodenfurniture <125113430+woodenfurniture@users.noreply.github.com> Date: Wed, 22 Nov 2023 09:12:44 +1100 Subject: [PATCH] fix: active step indicator for hops without allowance approval --- .../components/MultiHopTradeConfirm/components/Hop.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/Hop.tsx b/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/Hop.tsx index 63f27e9a012..926f0abdf6f 100644 --- a/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/Hop.tsx +++ b/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/Hop.tsx @@ -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),