From 6512cacec837b79703e7a76c949d05f1b0a4f722 Mon Sep 17 00:00:00 2001 From: Pritam Dhara <46365255+pritam1813@users.noreply.github.com> Date: Wed, 16 Aug 2023 03:29:29 +0530 Subject: [PATCH] Replaced ActionableMessage in confirm-page-container-content (#20417) * Replaced ActionableMessage in confirm-page-container-content * Updated Snapshot of confirm-transaction-base * Updated BannerAlert className * Using component API and replacing ErrorMessage * Update snapshot --------- Co-authored-by: George Marshall --- ...onfirm-page-container-content.component.js | 88 +++++++++---------- .../confirm-page-container-content/index.scss | 4 - .../confirm-transaction-base.test.js.snap | 35 +++----- 3 files changed, 56 insertions(+), 71 deletions(-) diff --git a/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js index a1656c5c1..4630cc5f9 100644 --- a/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js @@ -2,15 +2,17 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { Tabs, Tab } from '../../../ui/tabs'; -///: BEGIN:ONLY_INCLUDE_IN(build-main,build-beta,build-flask) -import Button from '../../../ui/button'; -///: END:ONLY_INCLUDE_IN -import ActionableMessage from '../../../ui/actionable-message/actionable-message'; +import { + ///: BEGIN:ONLY_INCLUDE_IN(build-main,build-beta,build-flask) + Button, + BUTTON_SIZES, + BUTTON_VARIANT, + ///: END:ONLY_INCLUDE_IN + BannerAlert, +} from '../../../component-library'; import { PageContainerFooter } from '../../../ui/page-container'; -import ErrorMessage from '../../../ui/error-message'; import { INSUFFICIENT_FUNDS_ERROR_KEY } from '../../../../helpers/constants/error-keys'; -import Typography from '../../../ui/typography'; -import { TypographyVariant } from '../../../../helpers/constants/design-system'; +import { Severity } from '../../../../helpers/constants/design-system'; import { isSuspiciousResponse } from '../../../../../shared/modules/security-provider.utils'; ///: BEGIN:ONLY_INCLUDE_IN(blockaid) @@ -256,46 +258,42 @@ export default class ConfirmPageContainerContent extends Component { {!supportsEIP1559 && !showInsuffienctFundsError && (errorKey || errorMessage) && ( -
- -
+ )} {showInsuffienctFundsError && ( -
- - {t('insufficientCurrencyBuyOrDeposit', [ - nativeCurrency, - networkName, - ///: BEGIN:ONLY_INCLUDE_IN(build-main,build-beta,build-flask) - , - ///: END:ONLY_INCLUDE_IN - ])} - - ) : ( - - {t('insufficientCurrencyDeposit', [ - nativeCurrency, - networkName, - ])} - - ) - } - useIcon - iconFillColor="var(--color-error-default)" - type="danger" - /> -
+ + {t('buyAsset', [nativeCurrency])} + , + ///: END:ONLY_INCLUDE_IN + ]) + : t('insufficientCurrencyDeposit', [ + nativeCurrency, + networkName, + ]) + } + /> )}
-
- +
+

- - - -

-
- You do not have enough in your account to pay for transaction fees on Goerli network. Deposit from another account. -
-
+ You do not have enough in your account to pay for transaction fees on Goerli network. Deposit from another account. +

+