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 446b810652cf..2eb78fba44c1 100644 --- a/ui/components/app/alert-system/alert-modal/alert-modal.tsx +++ b/ui/components/app/alert-system/alert-modal/alert-modal.tsx @@ -164,15 +164,14 @@ function AlertDetails({ > {customDetails ?? ( - {typeof selectedAlert.message === 'string' ? ( + {Boolean(selectedAlert.content) && selectedAlert.content} + {Boolean(selectedAlert.message) && ( {selectedAlert.message} - ) : ( - selectedAlert.message )} {selectedAlert.alertDetails?.length ? ( 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 1f37d4babbf0..5c222902b3ab 100644 --- a/ui/components/app/alert-system/general-alert/general-alert.tsx +++ b/ui/components/app/alert-system/general-alert/general-alert.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import React from 'react'; import { BannerAlert, Box, @@ -21,13 +21,14 @@ import { AlertProvider } from '../alert-provider'; import { AlertSeverity } from '../../../../ducks/confirm-alerts/confirm-alerts'; export type GeneralAlertProps = { - description: string | ReactNode; + description?: string; details?: React.ReactNode | string[]; onClickSupportLink?: () => void; provider?: SecurityProvider; reportUrl?: string; severity: AlertSeverity; title?: string; + children?: React.ReactNode; }; function ReportLink({ @@ -119,6 +120,7 @@ function GeneralAlert({ description={description} {...props} > + {props.children} ))} diff --git a/ui/pages/confirmations/hooks/alerts/transactions/usePendingTransactionAlerts.ts b/ui/pages/confirmations/hooks/alerts/transactions/usePendingTransactionAlerts.ts index 5394dcfbcf09..6ef15b5ff41f 100644 --- a/ui/pages/confirmations/hooks/alerts/transactions/usePendingTransactionAlerts.ts +++ b/ui/pages/confirmations/hooks/alerts/transactions/usePendingTransactionAlerts.ts @@ -30,7 +30,7 @@ export function usePendingTransactionAlerts(): Alert[] { { field: RowAlertKey.Speed, key: 'pendingTransactions', - message: PendingTransactionAlertMessage(), + content: PendingTransactionAlertMessage(), reason: t('alertReasonPendingTransactions'), severity: Severity.Warning, },