Skip to content

Commit

Permalink
Merge branch 'develop' into revert-revert-remove-splash
Browse files Browse the repository at this point in the history
  • Loading branch information
NeOMakinG authored Jan 6, 2025
2 parents 3eb1eae + 35b73ab commit 6958a4a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,16 @@ export const TradeFooterButton: FC<TradeFooterButtonProps> = ({
}, [tradeButtonProps, setHasClickedButton])

const handleClick = useCallback(() => {
if (isModeratePriceImpact) {
const isInitializingOrPreviewing =
confirmedTradeExecutionState === TradeExecutionState.Initializing ||
confirmedTradeExecutionState === TradeExecutionState.Previewing
// Only show the warning acknowledgement if the user is previewing the trade
if (isModeratePriceImpact && isInitializingOrPreviewing) {
setShouldShowWarningAcknowledgement(true)
} else {
handleSubmit()
}
}, [isModeratePriceImpact, handleSubmit])
}, [isModeratePriceImpact, handleSubmit, confirmedTradeExecutionState])

// Ratio of the fiat value of the gas fee to the fiat value of the trade value express in percentage
const isFeeRatioOverThreshold = useMemo(() => {
Expand Down
52 changes: 27 additions & 25 deletions src/components/Stepper.theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,36 +37,38 @@ const baseStyle = {
bg: 'border.base',
},
},
innerSteps: {
step: {
'&[data-status=active]': {
bg: 'background.surface.raised.base',
borderRadius: '8px',
},
}

const innerSteps = {
step: {
'&[data-status=active]': {
bg: 'background.surface.raised.base',
borderRadius: '8px',
},
indicator: {
width: '20px',
height: '20px',
minWidth: '20px',
},
indicator: {
width: '20px',
height: '20px',
minWidth: '20px',
borderWidth: '3px',
// Override the throbbing animation
'&[data-status=active]:not(.step-pending)': {
animation: 'none',
},
'&[data-status=active]': {
borderWidth: '3px',
},
'&[data-status=incomplete]': {
borderWidth: '3px',
},
'&[data-status=complete]': {
borderWidth: '3px',
// Override the throbbing animation
'&[data-status=active]:not(.step-pending)': {
animation: 'none',
},
'&[data-status=active]': {
borderWidth: '3px',
},
'&[data-status=incomplete]': {
borderWidth: '3px',
},
'&[data-status=complete]': {
borderWidth: '3px',
},
},
},
}

const variants = {
innerSteps,
error: {
indicator: {
'&[data-status=active]': {
Expand All @@ -83,9 +85,9 @@ const variants = {
},
},
innerStepsError: {
...baseStyle.innerSteps,
...innerSteps,
indicator: {
...baseStyle.innerSteps.indicator,
...innerSteps.indicator,
'&[data-status=active]:not(.step-pending)': {
animation: 'none',
borderWidth: '0',
Expand Down

0 comments on commit 6958a4a

Please sign in to comment.