mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
parent
31aa6c079a
commit
cf10b2a1a0
@ -175,7 +175,10 @@ export default function CollectibleDetails({ collectible }) {
|
|||||||
className="collectible-details__card"
|
className="collectible-details__card"
|
||||||
>
|
>
|
||||||
{image ? (
|
{image ? (
|
||||||
<img className="collectible-details__image" src={image} />
|
<img
|
||||||
|
className="collectible-details__image"
|
||||||
|
src={collectibleImageURL}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<CollectibleDefaultImage name={name} tokenId={tokenId} />
|
<CollectibleDefaultImage name={name} tokenId={tokenId} />
|
||||||
)}
|
)}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/* eslint-disable no-negated-condition */
|
/* eslint-disable no-negated-condition */
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
import { useSelector } from 'react-redux';
|
||||||
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
|
||||||
@ -7,6 +9,7 @@ import { TransactionType } from '../../../../../../shared/constants/transaction'
|
|||||||
import { toChecksumHexAddress } from '../../../../../../shared/modules/hexstring-utils';
|
import { toChecksumHexAddress } from '../../../../../../shared/modules/hexstring-utils';
|
||||||
import { useI18nContext } from '../../../../../hooks/useI18nContext';
|
import { useI18nContext } from '../../../../../hooks/useI18nContext';
|
||||||
import useAddressDetails from '../../../../../hooks/useAddressDetails';
|
import useAddressDetails from '../../../../../hooks/useAddressDetails';
|
||||||
|
import { getIpfsGateway } from '../../../../../selectors';
|
||||||
|
|
||||||
import Identicon from '../../../../ui/identicon';
|
import Identicon from '../../../../ui/identicon';
|
||||||
import InfoTooltip from '../../../../ui/info-tooltip';
|
import InfoTooltip from '../../../../ui/info-tooltip';
|
||||||
@ -15,6 +18,7 @@ import Typography from '../../../../ui/typography';
|
|||||||
import { TYPOGRAPHY } from '../../../../../helpers/constants/design-system';
|
import { TYPOGRAPHY } from '../../../../../helpers/constants/design-system';
|
||||||
import { ORIGIN_METAMASK } from '../../../../../../shared/constants/app';
|
import { ORIGIN_METAMASK } from '../../../../../../shared/constants/app';
|
||||||
import SiteOrigin from '../../../../ui/site-origin';
|
import SiteOrigin from '../../../../ui/site-origin';
|
||||||
|
import { getAssetImageURL } from '../../../../../helpers/utils/util';
|
||||||
|
|
||||||
const ConfirmPageContainerSummary = (props) => {
|
const ConfirmPageContainerSummary = (props) => {
|
||||||
const {
|
const {
|
||||||
@ -35,6 +39,7 @@ const ConfirmPageContainerSummary = (props) => {
|
|||||||
|
|
||||||
const [showNicknamePopovers, setShowNicknamePopovers] = useState(false);
|
const [showNicknamePopovers, setShowNicknamePopovers] = useState(false);
|
||||||
const t = useI18nContext();
|
const t = useI18nContext();
|
||||||
|
const ipfsGateway = useSelector(getIpfsGateway);
|
||||||
|
|
||||||
const contractInitiatedTransactionType = [
|
const contractInitiatedTransactionType = [
|
||||||
TransactionType.contractInteraction,
|
TransactionType.contractInteraction,
|
||||||
@ -62,12 +67,14 @@ const ConfirmPageContainerSummary = (props) => {
|
|||||||
const checksummedAddress = toChecksumHexAddress(contractAddress);
|
const checksummedAddress = toChecksumHexAddress(contractAddress);
|
||||||
|
|
||||||
const renderImage = () => {
|
const renderImage = () => {
|
||||||
|
const imagePath = getAssetImageURL(image, ipfsGateway);
|
||||||
|
|
||||||
if (image) {
|
if (image) {
|
||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
className="confirm-page-container-summary__icon"
|
className="confirm-page-container-summary__icon"
|
||||||
width={36}
|
width={36}
|
||||||
src={image}
|
src={imagePath}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else if (contractAddress) {
|
} else if (contractAddress) {
|
||||||
@ -76,7 +83,6 @@ const ConfirmPageContainerSummary = (props) => {
|
|||||||
className="confirm-page-container-summary__icon"
|
className="confirm-page-container-summary__icon"
|
||||||
diameter={36}
|
diameter={36}
|
||||||
address={contractAddress}
|
address={contractAddress}
|
||||||
image={image}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user