Skip to content

Commit

Permalink
chore: Cherry pick data deletion into v12.6.0 (#28223)
Browse files Browse the repository at this point in the history
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Cherry-pick PR #28221

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28223?quickstart=1)

Co-authored-by: Mark Stacey <[email protected]>
  • Loading branch information
hjetpoluru and Gudahtt authored Oct 31, 2024
1 parent 8b7ad81 commit eb9a2ed
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions app/scripts/services/data-deletion-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ import {
import getFetchWithTimeout from '../../../shared/modules/fetch-with-timeout';
import { DeleteRegulationStatus } from '../../../shared/constants/metametrics';

const DEFAULT_ANALYTICS_DATA_DELETION_SOURCE_ID =
process.env.ANALYTICS_DATA_DELETION_SOURCE_ID ?? 'test';
const DEFAULT_ANALYTICS_DATA_DELETION_ENDPOINT =
process.env.ANALYTICS_DATA_DELETION_ENDPOINT ??
'https://metametrics.metamask.test';
const inTest = process.env.IN_TEST;
const fallbackSourceId = 'test';
const fallbackDataDeletionEndpoint = 'https://metametrics.metamask.test';

const DEFAULT_ANALYTICS_DATA_DELETION_SOURCE_ID = inTest
? fallbackSourceId
: process.env.ANALYTICS_DATA_DELETION_SOURCE_ID ?? fallbackSourceId;
const DEFAULT_ANALYTICS_DATA_DELETION_ENDPOINT = inTest
? fallbackDataDeletionEndpoint
: process.env.ANALYTICS_DATA_DELETION_ENDPOINT ??
fallbackDataDeletionEndpoint;

/**
* The number of times we retry a specific failed request to the data deletion API.
Expand Down

0 comments on commit eb9a2ed

Please sign in to comment.