feat: currency conversion feature flag (#7123)

* feat: currency conversion feature flag

* removing eslint
This commit is contained in:
Jack Short 2023-08-11 13:13:17 -04:00 committed by GitHub
parent 2ce7b08244
commit 1249371397
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

@ -1,4 +1,5 @@
import { BaseVariant, FeatureFlag, featureFlagSettings, useUpdateFlag } from 'featureFlags' import { BaseVariant, FeatureFlag, featureFlagSettings, useUpdateFlag } from 'featureFlags'
import { useCurrencyConversionFlag } from 'featureFlags/flags/currencyConversion'
import { useForceUniswapXOnFlag } from 'featureFlags/flags/forceUniswapXOn' import { useForceUniswapXOnFlag } from 'featureFlags/flags/forceUniswapXOn'
import { useMultichainUXFlag } from 'featureFlags/flags/multichainUx' import { useMultichainUXFlag } from 'featureFlags/flags/multichainUx'
import { useRoutingAPIForPriceFlag } from 'featureFlags/flags/priceRoutingApi' import { useRoutingAPIForPriceFlag } from 'featureFlags/flags/priceRoutingApi'
@ -236,6 +237,12 @@ export default function FeatureFlagModal() {
featureFlag={FeatureFlag.routingAPIPrice} featureFlag={FeatureFlag.routingAPIPrice}
label="Use the routing-api v2 for price fetches" label="Use the routing-api v2 for price fetches"
/> />
<FeatureFlagOption
variant={BaseVariant}
value={useCurrencyConversionFlag()}
featureFlag={FeatureFlag.currencyConversion}
label="Enable currency conversion"
/>
<FeatureFlagOption <FeatureFlagOption
variant={BaseVariant} variant={BaseVariant}
value={useMultichainUXFlag()} value={useMultichainUXFlag()}

@ -0,0 +1,5 @@
import { BaseVariant, FeatureFlag, useBaseFlag } from '../index'
export function useCurrencyConversionFlag(): BaseVariant {
return useBaseFlag(FeatureFlag.currencyConversion)
}

@ -16,6 +16,7 @@ export enum FeatureFlag {
forceUniswapXOn = 'uniswapx_force_on', // forces routing-api's feature flag for uniswapx to turn on as well forceUniswapXOn = 'uniswapx_force_on', // forces routing-api's feature flag for uniswapx to turn on as well
uniswapXEthOutputEnabled = 'uniswapx_eth_output_enabled', uniswapXEthOutputEnabled = 'uniswapx_eth_output_enabled',
multichainUX = 'multichain_ux', multichainUX = 'multichain_ux',
currencyConversion = 'currency_conversion',
} }
interface FeatureFlagsContextType { interface FeatureFlagsContextType {