Skip to content

Commit

Permalink
Removing extra styles and adding image functionality to PickerNetwork…
Browse files Browse the repository at this point in the history
… in the confirmations header component
  • Loading branch information
georgewrmarshall committed Sep 23, 2023
1 parent 82b5a60 commit c7ad1bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ import {
BorderColor,
Display,
} from '../../../../helpers/constants/design-system';
import { getTestNetworkBackgroundColor } from '../../../../selectors';
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';
Expand All @@ -31,6 +34,7 @@ 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 =
Expand Down Expand Up @@ -78,12 +82,13 @@ export default function ConfirmPageContainerHeader({
)}
{isFullScreen ? null : (
<PickerNetwork
as="div"
src={currentNetwork?.rpcPrefs?.imageUrl}
label={
networkType === NETWORK_TYPES.RPC
? nickname ?? t('privateNetwork')
: t(getNetworkLabelKey(networkType))
}
as="div"
backgroundColor={BackgroundColor.transparent}
borderColor={BorderColor.borderMuted}
iconProps={{ display: Display.None }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,4 @@

margin-left: 6px;
}

.mm-picker-network-div {
cursor: default;

&:active {
background-color: initial;
color: initial;
}
}
}

.confirm-page-container-header-avatar-network-base {
padding-right: 1.5px;
}

0 comments on commit c7ad1bf

Please sign in to comment.