Skip to content

Commit

Permalink
feat: remove isBaseEnabled feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolin committed Dec 31, 2024
1 parent 935aeda commit 20fa75b
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions libs/common-hooks/src/useAvailableChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { useMemo } from 'react'
import { getAvailableChains } from '@cowprotocol/common-utils'
import { SupportedChainId } from '@cowprotocol/cow-sdk'

import { useFeatureFlags } from './useFeatureFlags'

/**
* Hook to get a list of SupportedChainId currently available/enabled
*
Expand All @@ -13,13 +11,14 @@ import { useFeatureFlags } from './useFeatureFlags'
* Set the flag in this hook.
*/
export function useAvailableChains(): SupportedChainId[] {
// 1. Load feature flag for chain being enabled
const { isBaseEnabled } = useFeatureFlags()
// // 1. Load feature flag for chain being enabled
// const { isBaseEnabled } = useFeatureFlags()

// return useMemo(
// // 2. Conditionally build a list of chain ids to exclude
// () => getAvailableChains(isBaseEnabled ? undefined : [SupportedChainId.BASE]),
// [isBaseEnabled],
// )

return useMemo(
// 2. Conditionally build a list of chain ids to exclude
// () => getAvailableChains(isArbitrumOneEnabled ? undefined : [SupportedChainId.ARBITRUM_ONE]),
() => getAvailableChains(isBaseEnabled ? undefined : [SupportedChainId.BASE]),
[isBaseEnabled],
)
return getAvailableChains()
}

0 comments on commit 20fa75b

Please sign in to comment.