diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 13a7091a03bc..3faa3d3b93cb 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -679,7 +679,7 @@ "message": "Blockaid" }, "blockaidAlertInfo": { - "message": "If you sign in, a third party known for scams might take all your assets. Please review the alerts before you proceed." + "message": "We don't recommend proceeding with this request." }, "blockaidDescriptionApproveFarming": { "message": "If you approve this request, a third party known for scams might take all your assets." diff --git a/ui/components/app/alert-system/alert-modal/alert-modal.tsx b/ui/components/app/alert-system/alert-modal/alert-modal.tsx index df6cb2b0e647..b53a49585649 100644 --- a/ui/components/app/alert-system/alert-modal/alert-modal.tsx +++ b/ui/components/app/alert-system/alert-modal/alert-modal.tsx @@ -137,7 +137,11 @@ function AlertHeader({ function BlockaidAlertDetails() { const t = useI18nContext(); - return {t('blockaidAlertInfo')}; + return ( + + {t('blockaidAlertInfo')} + + ); } function AlertDetails({ diff --git a/ui/components/app/alert-system/general-alert/general-alert.tsx b/ui/components/app/alert-system/general-alert/general-alert.tsx index 50a1975f861d..e446a5ba9dd2 100644 --- a/ui/components/app/alert-system/general-alert/general-alert.tsx +++ b/ui/components/app/alert-system/general-alert/general-alert.tsx @@ -11,6 +11,7 @@ import { DisclosureVariant } from '../../../ui/disclosure/disclosure.constants'; import { useI18nContext } from '../../../../hooks/useI18nContext'; import { Display, + FontWeight, TextVariant, } from '../../../../helpers/constants/design-system'; import { SecurityProvider } from '../../../../../shared/constants/security-provider'; @@ -79,7 +80,12 @@ function AlertDetails({ {details.map((detail, index) => ( - {detail} + + {detail} + ))} diff --git a/ui/hooks/useAlerts.ts b/ui/hooks/useAlerts.ts index ba10a371f2b6..92440822bbdd 100644 --- a/ui/hooks/useAlerts.ts +++ b/ui/hooks/useAlerts.ts @@ -62,7 +62,7 @@ const useAlerts = (ownerId: string) => { !isAlertConfirmed(alert.key) && alert.severity === Severity.Danger, ); const hasAlerts = alerts.length > 0; - const hasDangerAlerts = alerts.some( + const dangerAlerts = alerts.filter( (alert) => alert.severity === Severity.Danger, ); const hasUnconfirmedDangerAlerts = unconfirmedDangerAlerts.length > 0; @@ -73,7 +73,8 @@ const useAlerts = (ownerId: string) => { generalAlerts, getFieldAlerts, hasAlerts, - hasDangerAlerts, + dangerAlerts, + hasDangerAlerts: dangerAlerts?.length > 0, hasUnconfirmedDangerAlerts, isAlertConfirmed, setAlertConfirmed, diff --git a/ui/pages/confirmations/components/confirm/footer/footer.test.tsx b/ui/pages/confirmations/components/confirm/footer/footer.test.tsx index c0216d45e66d..1645a7684d09 100644 --- a/ui/pages/confirmations/components/confirm/footer/footer.test.tsx +++ b/ui/pages/confirmations/components/confirm/footer/footer.test.tsx @@ -202,7 +202,7 @@ describe('ConfirmFooter', () => { }; it('renders the review alerts button when there are unconfirmed alerts', () => { const { getByText } = render(stateWithAlertsMock); - expect(getByText('Review alerts')).toBeInTheDocument(); + expect(getByText('Confirm')).toBeInTheDocument(); }); it('renders the confirm button when there are no unconfirmed alerts', () => { diff --git a/ui/pages/confirmations/components/confirm/footer/footer.tsx b/ui/pages/confirmations/components/confirm/footer/footer.tsx index ee4a58634a92..b47c6fcacff1 100644 --- a/ui/pages/confirmations/components/confirm/footer/footer.tsx +++ b/ui/pages/confirmations/components/confirm/footer/footer.tsx @@ -43,7 +43,7 @@ const ConfirmButton = ({ const [confirmModalVisible, setConfirmModalVisible] = useState(false); - const { alerts, hasDangerAlerts, hasUnconfirmedDangerAlerts } = + const { alerts, dangerAlerts, hasDangerAlerts, hasUnconfirmedDangerAlerts } = useAlerts(alertOwnerId); const handleCloseConfirmModal = useCallback(() => { @@ -76,7 +76,7 @@ const ConfirmButton = ({ size={ButtonSize.Lg} disabled={hasUnconfirmedDangerAlerts ? false : disabled} > - {hasUnconfirmedDangerAlerts ? t('reviewAlerts') : t('confirm')} + {dangerAlerts?.length > 1 ? t('reviewAlerts') : t('confirm')} );