From 02a456844ac387213fad357f4003dc9b85a7e2f5 Mon Sep 17 00:00:00 2001 From: digiwand <20778143+digiwand@users.noreply.github.com> Date: Fri, 17 Jan 2025 10:14:56 -0800 Subject: [PATCH] refactor: cleanup --- .../SignatureBlockaidBanner.test.tsx | 19 ------------------- .../SignatureBlockaidBanner.tsx | 1 - .../components/SignatureRequest/index.js | 2 -- .../components/TypedSign/index.js | 8 -------- 4 files changed, 30 deletions(-) diff --git a/app/components/Views/confirmations/components/Confirm/SignatureBlockaidBanner/SignatureBlockaidBanner.test.tsx b/app/components/Views/confirmations/components/Confirm/SignatureBlockaidBanner/SignatureBlockaidBanner.test.tsx index 0b31760c0f5..b3df9b6b440 100644 --- a/app/components/Views/confirmations/components/Confirm/SignatureBlockaidBanner/SignatureBlockaidBanner.test.tsx +++ b/app/components/Views/confirmations/components/Confirm/SignatureBlockaidBanner/SignatureBlockaidBanner.test.tsx @@ -7,8 +7,6 @@ import { typedSignV1ConfirmationState, } from '../../../../../../util/test/confirm-data-helpers'; import SignatureBlockaidBanner from './index'; -import { MessageParamsTyped } from '@metamask/signature-controller'; -import { Hex } from '@metamask/utils'; jest.mock('react-native-gzip', () => ({ deflate: (str: string) => str, @@ -51,23 +49,6 @@ const typedSignV1ConfirmationStateWithBlockaidResponse = { }, }, }, - SignatureController: { - signatureRequests: { - '7e62bcb1-a4e9-11ef-9b51-ddf21c91a998': { - chainId: '0x1' as Hex, - messageParams: { - ...typedSignApproval.requestData, - } as MessageParamsTyped, - }, - }, - }, - RemoteFeatureFlagController: { - remoteFeatureFlags: { - confirmation_redesign: { - signatures: true, - }, - }, - }, }, }, }; diff --git a/app/components/Views/confirmations/components/Confirm/SignatureBlockaidBanner/SignatureBlockaidBanner.tsx b/app/components/Views/confirmations/components/Confirm/SignatureBlockaidBanner/SignatureBlockaidBanner.tsx index 249025e158d..198f2290376 100644 --- a/app/components/Views/confirmations/components/Confirm/SignatureBlockaidBanner/SignatureBlockaidBanner.tsx +++ b/app/components/Views/confirmations/components/Confirm/SignatureBlockaidBanner/SignatureBlockaidBanner.tsx @@ -30,7 +30,6 @@ const SignatureBlockaidBanner = () => { ), external_link_clicked: 'security_alert_support_link', }; - trackEvent( createEventBuilder(MetaMetricsEvents.SIGNATURE_REQUESTED) .addProperties(analyticsParams) diff --git a/app/components/Views/confirmations/components/SignatureRequest/index.js b/app/components/Views/confirmations/components/SignatureRequest/index.js index bccde7b1d36..9ba8a8eaf0c 100644 --- a/app/components/Views/confirmations/components/SignatureRequest/index.js +++ b/app/components/Views/confirmations/components/SignatureRequest/index.js @@ -19,7 +19,6 @@ import ActionView, { ConfirmButtonState } from '../../../../UI/ActionView'; import QRSigningDetails from '../../../../UI/QRHardware/QRSigningDetails'; import withQRHardwareAwareness from '../../../../UI/QRHardware/withQRHardwareAwareness'; import WebsiteIcon from '../../../../UI/WebsiteIcon'; -import { getSignatureDecodingEventProps } from '../../utils/signatureMetrics'; import BlockaidBanner from '../BlockaidBanner/BlockaidBanner'; import { ResultType } from '../BlockaidBanner/BlockaidBanner.types'; @@ -304,7 +303,6 @@ class SignatureRequest extends PureComponent { onContactUsClicked = () => { const { fromAddress, type } = this.props; - const analyticsParams = { ...getAnalyticsParams( { diff --git a/app/components/Views/confirmations/components/TypedSign/index.js b/app/components/Views/confirmations/components/TypedSign/index.js index ac2484cd970..04953a7865e 100644 --- a/app/components/Views/confirmations/components/TypedSign/index.js +++ b/app/components/Views/confirmations/components/TypedSign/index.js @@ -114,14 +114,6 @@ class TypedSign extends PureComponent { metrics, } = this.props; -<<<<<<< Updated upstream - const eventProps = { - ...getAnalyticsParams(messageParams, 'typed_sign'), - ...getSignatureDecodingEventProps(messageParams), - }; - -======= ->>>>>>> Stashed changes metrics.trackEvent( MetricsEventBuilder.createEventBuilder( MetaMetricsEvents.SIGNATURE_REQUESTED,