diff --git a/.env b/.env index 3e16ff104..c2c7bf583 100644 --- a/.env +++ b/.env @@ -9,6 +9,7 @@ REACT_APP_FEATURE_FLAG_MULTI_APP_STAKING=true REACT_APP_FEATURE_FLAG_FEEDBACK_MODULE=false REACT_APP_FEATURE_FLAG_POSTHOG=false REACT_APP_FEATURE_FLAG_SENTRY=$SENTRY_SUPPORT +REACT_APP_FEATURE_FLAG_LEDGER_LIVE=true REACT_APP_SENTRY_DSN=$SENTRY_DSN REACT_APP_ELECTRUM_PROTOCOL=$ELECTRUM_PROTOCOL diff --git a/.env.production b/.env.production index 8977adb36..99d0bf2f6 100644 --- a/.env.production +++ b/.env.production @@ -10,6 +10,7 @@ REACT_APP_FEATURE_FLAG_POSTHOG=$POSTHOG_SUPPORT REACT_APP_POSTHOG_API_KEY=$POSTHOG_API_KEY REACT_APP_POSTHOG_HOSTNAME_HTTP=$POSTHOG_HOSTNAME_HTTP REACT_APP_FEATURE_FLAG_SENTRY=$SENTRY_SUPPORT +REACT_APP_FEATURE_FLAG_LEDGER_LIVE=false REACT_APP_SENTRY_DSN=$SENTRY_DSN REACT_APP_ELECTRUM_PROTOCOL=$ELECTRUM_PROTOCOL diff --git a/src/components/Modal/SelectWalletModal/index.tsx b/src/components/Modal/SelectWalletModal/index.tsx index b574d6d35..b179ca3cd 100644 --- a/src/components/Modal/SelectWalletModal/index.tsx +++ b/src/components/Modal/SelectWalletModal/index.tsx @@ -19,6 +19,7 @@ import ConnectTaho from "./ConnectTaho" import ConnectLedgerLive from "./ConnectLedgerLive" import { LedgerLight } from "../../../static/icons/LedgerLight" import { LedgerDark } from "../../../static/icons/LedgerDark" +import { featureFlags } from "../../../constants" const walletOptions: WalletOption[] = [ { @@ -37,14 +38,18 @@ const walletOptions: WalletOption[] = [ dark: MetaMaskIcon, }, }, - { - id: WalletType.LedgerLive, - title: "Ledger Live", - icon: { - light: LedgerLight, - dark: LedgerDark, - }, - }, + ...(featureFlags.LEDGER_LIVE + ? [ + { + id: WalletType.LedgerLive, + title: "Ledger Live", + icon: { + light: LedgerLight, + dark: LedgerDark, + }, + }, + ] + : []), { id: WalletType.WalletConnect, title: "WalletConnect", diff --git a/src/constants/featureFlags.ts b/src/constants/featureFlags.ts index 4a2f61b3a..816c3d935 100644 --- a/src/constants/featureFlags.ts +++ b/src/constants/featureFlags.ts @@ -18,3 +18,6 @@ export const SENTRY = getEnvVariable(EnvVariable.FEATURE_FLAG_SENTRY) === "true" export const TBTC_V2_REDEMPTION = getEnvVariable(EnvVariable.FEATURE_FLAG_TBTC_V2_REDEMPTION) === "true" + +export const LEDGER_LIVE = + getEnvVariable(EnvVariable.FEATURE_FLAG_LEDGER_LIVE) === "true" diff --git a/src/enums/env.ts b/src/enums/env.ts index 39add5215..2cd02ee41 100644 --- a/src/enums/env.ts +++ b/src/enums/env.ts @@ -16,6 +16,7 @@ const envVariables = [ "FEATURE_FLAG_SENTRY", "SENTRY_DSN", "WALLET_CONNECT_PROJECT_ID", + "FEATURE_FLAG_LEDGER_LIVE", ] as const export type EnvVariableKey = typeof envVariables[number]