From 328626debe24bd6c5f6587fd278a3e4f40e22ffc Mon Sep 17 00:00:00 2001 From: Adnan Sahovic <63151811+adnansahovic@users.noreply.github.com> Date: Wed, 9 Nov 2022 16:36:21 +0100 Subject: [PATCH] Warning on a Send transaction request (#16220) --- ...onfirm-page-container-content.component.js | 34 +++++++----- .../confirm-page-container.component.js | 16 ++++-- .../confirm-page-container.container.js | 12 +---- .../confirm-transaction-base.component.js | 3 -- .../confirm-transaction-base.container.js | 1 - .../transaction-alerts/transaction-alerts.js | 54 +------------------ .../transaction-alerts.test.js | 24 --------- 7 files changed, 35 insertions(+), 109 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 b7cd74218..98b0f91ab 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 @@ -9,7 +9,7 @@ import ErrorMessage from '../../../ui/error-message'; import { INSUFFICIENT_FUNDS_ERROR_KEY } from '../../../../helpers/constants/error-keys'; import Typography from '../../../ui/typography'; import { TYPOGRAPHY } from '../../../../helpers/constants/design-system'; -import { TRANSACTION_TYPES } from '../../../../../shared/constants/transaction'; +import DepositPopover from '../../deposit-popover/deposit-popover'; import { ConfirmPageContainerSummary, ConfirmPageContainerWarning } from '.'; @@ -50,15 +50,17 @@ export default class ConfirmPageContainerContent extends Component { hideTitle: PropTypes.bool, supportsEIP1559V2: PropTypes.bool, hasTopBorder: PropTypes.bool, - currentTransaction: PropTypes.object, nativeCurrency: PropTypes.string, networkName: PropTypes.string, - showBuyModal: PropTypes.func, toAddress: PropTypes.string, transactionType: PropTypes.string, isBuyableChain: PropTypes.bool, }; + state = { + setShowDepositPopover: false, + }; + renderContent() { const { detailsComponent, dataComponent } = this.props; @@ -153,10 +155,8 @@ export default class ConfirmPageContainerContent extends Component { hideTitle, supportsEIP1559V2, hasTopBorder, - currentTransaction, nativeCurrency, networkName, - showBuyModal, toAddress, transactionType, isBuyableChain, @@ -169,6 +169,8 @@ export default class ConfirmPageContainerContent extends Component { (errorKey || errorMessage) && errorKey === INSUFFICIENT_FUNDS_ERROR_KEY; + const { setShowDepositPopover } = this.state; + return (
{this.renderContent()} - {!supportsEIP1559V2 && - (errorKey || errorMessage) && - currentTransaction.type !== TRANSACTION_TYPES.SIMPLE_SEND && ( -