From 12e9ddcef1585538f2c8e22c2616778a75731a95 Mon Sep 17 00:00:00 2001 From: Brian Lee <62791515+Lz020316@users.noreply.github.com> Date: Mon, 6 May 2024 22:19:15 +0800 Subject: [PATCH] fix: approve button show --- src/components/Swap/SwapActionButton/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/Swap/SwapActionButton/index.tsx b/src/components/Swap/SwapActionButton/index.tsx index f7a6b8e73..7aadae983 100644 --- a/src/components/Swap/SwapActionButton/index.tsx +++ b/src/components/Swap/SwapActionButton/index.tsx @@ -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' @@ -43,6 +44,8 @@ export default function SwapActionButton() { return } else if (isWrap) { return + } else if (approval.state !== SwapApprovalState.APPROVED) { + return } else { return }