Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/Swap/SwapActionButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { usePermit2 as usePermit2Enabled } from 'hooks/useSyncFlags'
import { useMemo } from 'react'
import { Field } from 'state/swap'

import ApproveButton from './ApproveButton'
import ConnectWalletButton from './ConnectWalletButton'
import SwapButton from './SwapButton'
import SwitchChainButton from './SwitchChainButton'
Expand Down Expand Up @@ -43,6 +44,8 @@ export default function SwapActionButton() {
return <SwitchChainButton chainId={supportedTokenChainId} />
} else if (isWrap) {
return <WrapButton disabled={isDisabled} />
} else if (approval.state !== SwapApprovalState.APPROVED) {
return <ApproveButton trade={trade} state={approval.state} approve={approval.approve} />
} else {
return <SwapButton disabled={isDisabled} />
}
Expand Down