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 23, 2024
1 parent 4c9ece3 commit 1b8ad2a
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 @@ -2932,7 +2932,6 @@ export default class MetamaskController extends EventEmitter {
userStorageController,
metamaskNotificationsController,
pushPlatformNotificationsController,
metaMetricsDataDeletionController,
} = this;

return {
Expand Down Expand Up @@ -3728,12 +3727,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 @@ -116,7 +116,6 @@ import {
import { ThemeType } from '../../shared/constants/preferences';
import { FirstTimeFlowType } from '../../shared/constants/onboarding';
import type { MarkAsReadNotificationsParam } from '../../app/scripts/controllers/metamask-notifications/types/notification/notification';
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 @@ -5090,26 +5089,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 1b8ad2a

Please sign in to comment.