Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Hide simulation section in typed sign v1 pages #13139

Merged
merged 5 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions app/components/Views/confirmations/Confirm/Confirm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ describe('Confirm', () => {
state: typedSignV1ConfirmationState,
});
expect(getByText('Signature request')).toBeDefined();
expect(getByText('Estimated changes')).toBeDefined();
expect(
getByText(
"You're signing into a site and there are no predicted changes to your account.",
),
).toBeDefined();
expect(getByText('Request from')).toBeDefined();
expect(getByText('metamask.github.io')).toBeDefined();
expect(getAllByText('Message')).toHaveLength(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Button, {
import { useStyles } from '../../../../../../component-library/hooks';
import { useConfirmActions } from '../../../hooks/useConfirmActions';
import { useSecurityAlertResponse } from '../../../hooks/useSecurityAlertResponse';
import { ResultType } from '../../BlockaidBanner/BlockaidBanner.types';
import styleSheet from './Footer.styles';

const Footer = () => {
Expand All @@ -36,7 +37,7 @@ const Footer = () => {
size={ButtonSize.Lg}
variant={ButtonVariants.Primary}
width={ButtonWidthTypes.Full}
isDanger={securityAlertResponse !== undefined}
isDanger={securityAlertResponse?.result_type === ResultType.Malicious}
/>
</View>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ describe('TypedSignV1', () => {
const { getByText, getAllByText } = renderWithProvider(<TypedSignV1 />, {
state: typedSignV1ConfirmationState,
});
expect(getByText('Estimated changes')).toBeDefined();
expect(
getByText(
"You're signing into a site and there are no predicted changes to your account.",
),
).toBeDefined();
expect(getByText('Request from')).toBeDefined();
expect(getByText('metamask.github.io')).toBeDefined();
expect(getAllByText('Message')).toHaveLength(2);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';

import useApprovalRequest from '../../../../hooks/useApprovalRequest';
import NoChangeSimulation from '../../NoChangeSimulation';
import InfoRowOrigin from '../Shared/InfoRowOrigin';
import Message from './Message';

Expand All @@ -14,7 +13,6 @@ const TypedSignV1 = () => {

return (
<>
<NoChangeSimulation />
<InfoRowOrigin />
<Message />
</>
Expand Down
Loading