Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
getParticipateInMetaMetrics,
getUseExternalServices,
} from '../../../../selectors';
import { getIsActiveShieldSubscription } from '../../../../selectors/subscription';

const MetametricsToggle = ({
dataCollectionForMarketing,
Expand All @@ -49,10 +48,6 @@ const MetametricsToggle = ({
const isBackupAndSyncEnabled = useSelector(selectIsBackupAndSyncEnabled);
const participateInMetaMetrics = useSelector(getParticipateInMetaMetrics);
const useExternalServices = useSelector(getUseExternalServices);
const isActiveShieldSubscription = useSelector(getIsActiveShieldSubscription);
// we will enable the metametrics option if the user has a shield subscription and user can't toggle the metametrics option with active shield subscription
const disableMetametricsToggle =
isActiveShieldSubscription || !useExternalServices;

const handleUseParticipateInMetaMetrics = async (isParticipated: boolean) => {
if (isParticipated) {
Expand Down Expand Up @@ -121,7 +116,7 @@ const MetametricsToggle = ({
>
<ToggleButton
value={participateInMetaMetrics}
disabled={disableMetametricsToggle}
disabled={!useExternalServices}
onToggle={(value) => handleUseParticipateInMetaMetrics(!value)}
offLabel={t('off')}
onLabel={t('on')}
Expand Down
Loading