diff --git a/ui/hooks/bridge/useBridging.ts b/ui/hooks/bridge/useBridging.ts index a8307658e285..2b7ffb0083c9 100644 --- a/ui/hooks/bridge/useBridging.ts +++ b/ui/hooks/bridge/useBridging.ts @@ -10,6 +10,7 @@ import { getIsBridgeEnabled, getMetaMetricsId, getParticipateInMetaMetrics, + getUseExternalServices, SwapsEthToken, ///: END:ONLY_INCLUDE_IF } from '../../selectors'; @@ -45,6 +46,7 @@ const useBridging = () => { const isMarketingEnabled = useSelector(getDataCollectionForMarketing); const providerConfig = useSelector(getProviderConfig); const keyring = useSelector(getCurrentKeyring); + const isExternalServicesEnabled = useSelector(getUseExternalServices); // @ts-expect-error keyring type is wrong maybe? const usingHardwareWallet = isHardwareKeyring(keyring.type); @@ -52,7 +54,9 @@ const useBridging = () => { const isBridgeChain = useSelector(getIsBridgeChain); useEffect(() => { - dispatch(setBridgeFeatureFlags()); + if (isExternalServicesEnabled) { + dispatch(setBridgeFeatureFlags()); + } }, [dispatch, setBridgeFeatureFlags]); const openBridgeExperience = useCallback(