diff --git a/ui/components/app/confirm-page-container/confirm-page-container-header/__snapshots__/confirm-page-container-header.component.test.js.snap b/ui/components/app/confirm-page-container/confirm-page-container-header/__snapshots__/confirm-page-container-header.component.test.js.snap index 6bcd678b78c5..fbf0e3123ca7 100644 --- a/ui/components/app/confirm-page-container/confirm-page-container-header/__snapshots__/confirm-page-container-header.component.test.js.snap +++ b/ui/components/app/confirm-page-container/confirm-page-container-header/__snapshots__/confirm-page-container-header.component.test.js.snap @@ -25,26 +25,22 @@ exports[`Confirm Detail Row Component should match snapshot 1`] = `
-
- -
+ P
Private network +
diff --git a/ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js b/ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js index 7defa58d10c7..4cda34e4b3a9 100644 --- a/ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js @@ -1,16 +1,28 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { useSelector } from 'react-redux'; import { ENVIRONMENT_TYPE_POPUP, ENVIRONMENT_TYPE_NOTIFICATION, } from '../../../../../shared/constants/app'; import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; -import NetworkDisplay from '../../network-display'; import Identicon from '../../../ui/identicon'; import { shortenAddress } from '../../../../helpers/utils/util'; import AccountMismatchWarning from '../../../ui/account-mismatch-warning/account-mismatch-warning.component'; import { useI18nContext } from '../../../../hooks/useI18nContext'; -import { Icon, IconName } from '../../../component-library'; +import { Icon, IconName, PickerNetwork } from '../../../component-library'; +import { + BackgroundColor, + BorderColor, + Display, +} from '../../../../helpers/constants/design-system'; +import { + getCurrentNetwork, + getTestNetworkBackgroundColor, +} from '../../../../selectors'; +import { getProviderConfig } from '../../../../ducks/metamask/metamask'; +import { NETWORK_TYPES } from '../../../../../shared/constants/network'; +import { getNetworkLabelKey } from '../../../../helpers/utils/i18n-helper'; export default function ConfirmPageContainerHeader({ onEdit, @@ -21,6 +33,10 @@ export default function ConfirmPageContainerHeader({ }) { const t = useI18nContext(); const windowType = getEnvironmentType(); + const { nickname, type: networkType } = useSelector(getProviderConfig); + const currentNetwork = useSelector(getCurrentNetwork); + const testNetworkBackgroundColor = useSelector(getTestNetworkBackgroundColor); + const isFullScreen = windowType !== ENVIRONMENT_TYPE_NOTIFICATION && windowType !== ENVIRONMENT_TYPE_POPUP; @@ -64,7 +80,23 @@ export default function ConfirmPageContainerHeader({ )} - {isFullScreen ? null : } + {isFullScreen ? null : ( + + )} {children}