Skip to content

Commit

Permalink
fixing the actions
Browse files Browse the repository at this point in the history
  • Loading branch information
NiranjanaBinoy committed May 22, 2024
1 parent c20f93c commit 75158b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
11 changes: 5 additions & 6 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2877,7 +2877,6 @@ export default class MetamaskController extends EventEmitter {
backup,
approvalController,
phishingController,
metaMetricsDataDeletionController,
} = this;

return {
Expand Down Expand Up @@ -3603,12 +3602,12 @@ export default class MetamaskController extends EventEmitter {
setName: this.nameController.setName.bind(this.nameController),
// metrics data deleteion
createMetaMetricsDataDeletionTask:
metaMetricsDataDeletionController.createMetaMetricsDataDeletionTask.bind(
metaMetricsDataDeletionController,
this.metaMetricsDataDeletionController.createMetaMetricsDataDeletionTask.bind(
this.metaMetricsDataDeletionController,
),
checkDataDeletionTaskStatus:
metaMetricsDataDeletionController.checkDataDeletionTaskStatus.bind(
metaMetricsDataDeletionController,
updateDataDeletionTaskStatus:
this.metaMetricsDataDeletionController.updateDataDeletionTaskStatus.bind(
this.metaMetricsDataDeletionController,
),
};
}
Expand Down
20 changes: 4 additions & 16 deletions ui/store/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ import {
} from '../../shared/modules/error';
import { ThemeType } from '../../shared/constants/preferences';
import { FirstTimeFlowType } from '../../shared/constants/onboarding';
import { DataDeletionResponse } from '../../app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion';
import * as actionConstants from './actionConstants';
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
import { updateCustodyState } from './institutional/institution-actions';
Expand Down Expand Up @@ -5089,26 +5088,15 @@ export function setName(
/**
* To create a data deletion regulation for MetaMetrics data deletion
*/
export function createMetaMetricsDataDeletionTask(): ThunkAction<
void,
MetaMaskReduxState,
unknown,
AnyAction
> {
return async () => {
await submitRequestToBackground('createMetaMetricsDataDeletionTask');
};
export async function createMetaMetricsDataDeletionTask(): Promise<void> {
await submitRequestToBackground('createMetaMetricsDataDeletionTask');
}

/**
* To check the status of the current delete regulation.
*/
export async function UpdateDataDeletionTaskStatusAction(): Promise<void> {
return async () => {
await submitRequestToBackground<DataDeletionResponse>(
'UpdateDataDeletionTaskStatusAction',
);
};
export async function updateDataDeletionTaskStatus(): Promise<void> {
await submitRequestToBackground('updateDataDeletionTaskStatus');
}

/**
Expand Down

0 comments on commit 75158b0

Please sign in to comment.