diff --git a/src/components/MultiHopTrade/components/TradeConfirm/ExpandedStepperSteps.tsx b/src/components/MultiHopTrade/components/TradeConfirm/ExpandedStepperSteps.tsx
index 4bcb8249f47..feb6d2154c4 100644
--- a/src/components/MultiHopTrade/components/TradeConfirm/ExpandedStepperSteps.tsx
+++ b/src/components/MultiHopTrade/components/TradeConfirm/ExpandedStepperSteps.tsx
@@ -211,21 +211,6 @@ export const ExpandedStepperSteps = ({ activeTradeQuote }: ExpandedStepperStepsP
>
)
- // Allowance granted, but still waiting for the actual Permit2 signature granting temp 5mn allowance to the contract
- if (
- firstHopPermit2.isRequired &&
- hopExecutionState === HopExecutionState.AwaitingPermit2Eip712Sign
- )
- return (
- <>
-
-
-
-
-
-
- >
- )
// Good ol' allowances
return (
@@ -252,11 +237,23 @@ export const ExpandedStepperSteps = ({ activeTradeQuote }: ExpandedStepperStepsP
firstHopPermit2.isRequired,
firstHopSellAccountId,
hopExecutionState,
- swapperName,
tradeQuoteFirstHop,
translate,
])
+ const firstHopPermit2SignTitle = useMemo(() => {
+ return (
+
+
+
+
+
+
+
+
+ )
+ }, [swapperName, translate])
+
const firstHopActionTitle = useMemo(() => {
return (
@@ -455,6 +452,16 @@ export const ExpandedStepperSteps = ({ activeTradeQuote }: ExpandedStepperStepsP
stepIndicatorVariant='innerSteps'
/>
) : null}
+ {tradeSteps[StepperStep.FirstHopPermit2Sign] ? (
+
+ ) : null}
{
}
const isInApprovalState = (state: HopExecutionState): boolean => {
- return [
- HopExecutionState.AwaitingAllowanceApproval,
- HopExecutionState.AwaitingPermit2Eip712Sign,
- ].includes(state)
+ return state === HopExecutionState.AwaitingAllowanceApproval
+}
+
+const isInPermit2SignState = (state: HopExecutionState): boolean => {
+ return state === HopExecutionState.AwaitingPermit2Eip712Sign
}
export const getCurrentStepperStep = (
@@ -123,6 +124,7 @@ export const getCurrentStepperStep = (
if (hopExecutionState === HopExecutionState.AwaitingAllowanceReset)
return StepperStep.FirstHopReset
if (isInApprovalState(hopExecutionState)) return StepperStep.FirstHopApproval
+ if (isInPermit2SignState(hopExecutionState)) return StepperStep.FirstHopPermit2Sign
if (hopExecutionState === HopExecutionState.AwaitingSwap) return StepperStep.FirstHopSwap
} else if (currentHopIndex === 1) {
if (hopExecutionState === HopExecutionState.AwaitingAllowanceReset)