Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/1.48.0' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
alfetopito committed Oct 12, 2023
2 parents 11d7e7c + 29e5178 commit a11703f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit a11703f

Please sign in to comment.