Skip to content

Commit

Permalink
unneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
blackdevelopa committed Sep 20, 2023
1 parent 3cf030f commit b2e46e6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 28 deletions.
3 changes: 2 additions & 1 deletion app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ exports[`Security Provider Banner Alert should match snapshot 1`] = `
</details>
</div>
<p
class="mm-box mm-text mm-text--body-sm mm-box--margin-top-3 mm-box--display-flex mm-box--align-items-center mm-box--color-text-alternative"
class="mm-box mm-text mm-text--body-md mm-box--margin-top-3 mm-box--display-flex mm-box--color-text-default"
>
[somethingDoesntLookRight]
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,7 @@ function SecurityProviderBannerAlert({

{provider && (
<>
<Text
marginTop={3}
display={Display.Flex}
alignItems={AlignItems.center}
color={Color.textAlternative}
variant={TextVariant.bodySm}
>
<Text marginTop={3} display={Display.Flex}>
{t('somethingDoesntLookRight', [
<ButtonLink
key={`security-provider-button-supporturl-${provider}`}
Expand Down Expand Up @@ -123,7 +117,7 @@ SecurityProviderBannerAlert.propTypes = {
/** Name of the security provider */
provider: PropTypes.oneOf(Object.values(SecurityProvider)),

/** Function to be called when the blockaid support link is clicked */
/** Function to be called when the support link is clicked */
onClickSupportLink: PropTypes.func,
};

Expand Down
19 changes: 1 addition & 18 deletions ui/components/app/transaction-alerts/transaction-alerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,14 @@ import PropTypes from 'prop-types';
import { useSelector } from 'react-redux';

import { PriorityLevels } from '../../../../shared/constants/gas';
import {
submittedPendingTransactionsSelector,
///: BEGIN:ONLY_INCLUDE_IN(blockaid)
getKnownMethodData,
///: END:ONLY_INCLUDE_IN
} from '../../../selectors';
import { submittedPendingTransactionsSelector } from '../../../selectors';
import { useGasFeeContext } from '../../../contexts/gasFee';
import { useI18nContext } from '../../../hooks/useI18nContext';
import { BannerAlert, ButtonLink, Text } from '../../component-library';
import SimulationErrorMessage from '../../ui/simulation-error-message';
import { SEVERITIES } from '../../../helpers/constants/design-system';
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
///: BEGIN:ONLY_INCLUDE_IN(blockaid)
import { getMethodName } from '../../../helpers/utils/metrics';
import { TransactionType } from '../../../../shared/constants/transaction';
import { MetaMetricsContext } from '../../../contexts/metametrics';
///: END:ONLY_INCLUDE_IN

Expand Down Expand Up @@ -50,10 +43,6 @@ const TransactionAlerts = ({

///: BEGIN:ONLY_INCLUDE_IN(blockaid)
const trackEvent = useContext(MetaMetricsContext);
const txParams = txData?.txParams || {};
const methodData = useSelector((state) =>
getKnownMethodData(state, txParams?.data),
);
///: END:ONLY_INCLUDE_IN

///: BEGIN:ONLY_INCLUDE_IN(blockaid)
Expand All @@ -63,12 +52,6 @@ const TransactionAlerts = ({
event: MetaMetricsEventName.ExternalLinkClicked,
properties: {
action: 'Confirm Screen',
legacy_event: true,
recipientKnown: null,
functionType:
'confirm' ||
getMethodName(methodData.name) ||
TransactionType.contractInteraction,
origin: txData?.origin,
external_link_clicked: true,
security_alert_support_link: ZENDESK_URLS.SUPPORT_URL,
Expand Down

0 comments on commit b2e46e6

Please sign in to comment.