diff --git a/ui/components/app/collectible-default-image/collectible-default-image.js b/ui/components/app/collectible-default-image/collectible-default-image.js
index c301c2c2c..c1206307d 100644
--- a/ui/components/app/collectible-default-image/collectible-default-image.js
+++ b/ui/components/app/collectible-default-image/collectible-default-image.js
@@ -11,8 +11,10 @@ export default function CollectibleDefaultImage({
handleImageClick,
}) {
const t = useI18nContext();
+ const Tag = handleImageClick ? 'button' : 'div';
return (
-
{name ?? t('unknownCollection')}
#{tokenId}
-
+
);
}
diff --git a/ui/components/app/collectible-details/collectible-details.js b/ui/components/app/collectible-details/collectible-details.js
index 546986da7..1f0212c3c 100644
--- a/ui/components/app/collectible-details/collectible-details.js
+++ b/ui/components/app/collectible-details/collectible-details.js
@@ -7,6 +7,7 @@ import { isEqual } from 'lodash';
import Box from '../../ui/box';
import Card from '../../ui/card';
import Typography from '../../ui/typography/typography';
+import { ButtonIcon, ICON_NAMES } from '../../component-library';
import {
COLORS,
TYPOGRAPHY,
@@ -26,7 +27,6 @@ import {
getSelectedIdentity,
} from '../../../selectors';
import AssetNavigation from '../../../pages/asset/components/asset-navigation';
-import Copy from '../../ui/icon/copy-icon.component';
import { getCollectibleContracts } from '../../../ducks/metamask/metamask';
import { DEFAULT_ROUTE, SEND_ROUTE } from '../../../helpers/constants/routes';
import {
@@ -67,7 +67,8 @@ export default function CollectibleDetails({ collectible }) {
const ipfsGateway = useSelector(getIpfsGateway);
const collectibleContracts = useSelector(getCollectibleContracts);
const currentNetwork = useSelector(getCurrentChainId);
- const [copied, handleCopy] = useCopyToClipboard();
+ const [sourceCopied, handleSourceCopy] = useCopyToClipboard();
+ const [addressCopied, handleAddressCopy] = useCopyToClipboard();
const collectibleContractName = collectibleContracts.find(
({ address: contractAddress }) =>
@@ -80,6 +81,7 @@ export default function CollectibleDetails({ collectible }) {
imageOriginal ?? image,
ipfsGateway,
);
+ const isDataURI = collectibleImageURL.startsWith('data:');
const onRemove = () => {
dispatch(removeAndIgnoreNft(address, tokenId));
@@ -239,23 +241,39 @@ export default function CollectibleDetails({ collectible }) {
{t('source')}
-
- {collectibleImageURL}
-
+ {isDataURI ? (
+ <>{collectibleImageURL}>
+ ) : (
+
+ {collectibleImageURL}
+
+ )}
+ {
+ handleSourceCopy(collectibleImageURL);
+ }}
+ iconName={
+ sourceCopied
+ ? ICON_NAMES.COPY_SUCCESS_FILLED
+ : ICON_NAMES.COPY_FILLED
+ }
+ />
-
+ iconName={
+ addressCopied
+ ? ICON_NAMES.COPY_SUCCESS_FILLED
+ : ICON_NAMES.COPY_FILLED
+ }
+ />
{inPopUp ? renderSendButton() : null}
diff --git a/ui/components/app/collectible-details/index.scss b/ui/components/app/collectible-details/index.scss
index 44cad6eb5..aa059e216 100644
--- a/ui/components/app/collectible-details/index.scss
+++ b/ui/components/app/collectible-details/index.scss
@@ -68,6 +68,7 @@ $spacer-break-small: 16px;
cursor: pointer;
color: var(--color-text-alternative);
border: 0;
+ margin-top: -4px;
&:active {
transform: scale(0.97);
@@ -78,13 +79,14 @@ $spacer-break-small: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
+ width: 332px;
}
- &__image-link {
+ &__image-source {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- max-width: 332px;
+ width: 332px;
}
&__link-title {
diff --git a/ui/components/app/collectibles-items/collectibles-items.js b/ui/components/app/collectibles-items/collectibles-items.js
index d4d7d9d51..f28006ae0 100644
--- a/ui/components/app/collectibles-items/collectibles-items.js
+++ b/ui/components/app/collectibles-items/collectibles-items.js
@@ -164,8 +164,7 @@ export default function CollectiblesItems({
{`${collectionName ?? t('unknownCollection')} (${
collectibles.length
@@ -203,18 +202,18 @@ export default function CollectiblesItems({
className="collectibles-items__item-wrapper__card"
>
{collectibleImage ? (
-
-
+
) : (
{TitleTextCustomComponent ||
(titleText && (