diff --git a/apps/cowswap-frontend/src/common/hooks/featureFlags/useIsPermitEnabled.ts b/apps/cowswap-frontend/src/common/hooks/featureFlags/useIsPermitEnabled.ts index 56dff4497e..04e42129b7 100644 --- a/apps/cowswap-frontend/src/common/hooks/featureFlags/useIsPermitEnabled.ts +++ b/apps/cowswap-frontend/src/common/hooks/featureFlags/useIsPermitEnabled.ts @@ -1,10 +1,17 @@ import { SupportedChainId } from '@cowprotocol/cow-sdk' +import { useIsSmartContractWallet } from '@cowprotocol/wallet' import { useFeatureFlags } from './useFeatureFlags' export function useIsPermitEnabled(chainId: SupportedChainId | undefined): boolean { + const isSmartContractWallet = useIsSmartContractWallet() const { permitEnabledMainnet, permitEnabledGoerli, permitEnabledGnosis } = useFeatureFlags() + // Permit is only available for EOAs + if (isSmartContractWallet) { + return false + } + switch (chainId) { case SupportedChainId.MAINNET: return !!permitEnabledMainnet