From 2825b74a550d05800717de6ee16498520062ef3b Mon Sep 17 00:00:00 2001 From: Hassan Malik <41640681+hmalik88@users.noreply.github.com> Date: Fri, 28 Jan 2022 09:39:32 -0800 Subject: [PATCH] added extension changes from snaps branch (#13433) --- .../app/permissions-connect-footer/index.scss | 2 +- ui/pages/confirmation/confirmation.js | 37 ++++++++----------- ui/pages/confirmation/templates/index.js | 1 + 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/ui/components/app/permissions-connect-footer/index.scss b/ui/components/app/permissions-connect-footer/index.scss index 699bd777e..56ffbc3fe 100644 --- a/ui/components/app/permissions-connect-footer/index.scss +++ b/ui/components/app/permissions-connect-footer/index.scss @@ -7,7 +7,7 @@ &__text { @include H7; - color: #6a737d; + color: var(--ui-4); display: flex; margin-top: 10px; diff --git a/ui/pages/confirmation/confirmation.js b/ui/pages/confirmation/confirmation.js index 8aa01ea79..44768c633 100644 --- a/ui/pages/confirmation/confirmation.js +++ b/ui/pages/confirmation/confirmation.js @@ -10,17 +10,15 @@ import { useHistory } from 'react-router-dom'; import { isEqual } from 'lodash'; import { produce } from 'immer'; import Box from '../../components/ui/box'; -import Chip from '../../components/ui/chip'; import MetaMaskTemplateRenderer from '../../components/app/metamask-template-renderer'; -import SiteIcon from '../../components/ui/site-icon'; import { DEFAULT_ROUTE } from '../../helpers/constants/routes'; -import { stripHttpsScheme } from '../../helpers/utils/util'; import { useI18nContext } from '../../hooks/useI18nContext'; import { useOriginMetadata } from '../../hooks/useOriginMetadata'; import { getUnapprovedTemplatedConfirmations } from '../../selectors'; import NetworkDisplay from '../../components/app/network-display/network-display'; import { COLORS, SIZES } from '../../helpers/constants/design-system'; import Callout from '../../components/ui/callout'; +import SiteOrigin from '../../components/ui/site-origin'; import ConfirmationFooter from './components/confirmation-footer'; import { getTemplateValues, getTemplateAlerts } from './templates'; @@ -124,7 +122,7 @@ export default function ConfirmationPage() { 0, ); const pendingConfirmation = pendingConfirmations[currentPendingConfirmation]; - const originMetadata = useOriginMetadata(pendingConfirmation?.origin); + const originMetadata = useOriginMetadata(pendingConfirmation?.origin) || {}; const [alertState, dismissAlert] = useAlertState(pendingConfirmation); // Generating templatedValues is potentially expensive, and if done on every render @@ -185,23 +183,20 @@ export default function ConfirmationPage() { )}
- - - - - - } + {templatedValues.networkDisplay ? ( + + + + ) : null} + + diff --git a/ui/pages/confirmation/templates/index.js b/ui/pages/confirmation/templates/index.js index 790827178..2bbf54b1e 100644 --- a/ui/pages/confirmation/templates/index.js +++ b/ui/pages/confirmation/templates/index.js @@ -22,6 +22,7 @@ const ALLOWED_TEMPLATE_KEYS = [ 'cancelText', 'onApprove', 'onCancel', + 'networkDisplay', ]; /**