diff --git a/ui/pages/confirm-add-suggested-nft/confirm-add-suggested-nft.js b/ui/pages/confirm-add-suggested-nft/confirm-add-suggested-nft.js index f49dfe5ff..f0e2511be 100644 --- a/ui/pages/confirm-add-suggested-nft/confirm-add-suggested-nft.js +++ b/ui/pages/confirm-add-suggested-nft/confirm-add-suggested-nft.js @@ -106,9 +106,12 @@ const ConfirmAddSuggestedNFT = () => { }, [history, mostRecentOverviewPage, suggestedNfts]); let origin; + let link; if (suggestedNfts.length) { try { - origin = new URL(suggestedNfts[0].origin)?.host; + const url = new URL(suggestedNfts[0].origin); + origin = url.host; + link = url.href; } catch { origin = 'dapp'; } @@ -138,7 +141,7 @@ const ConfirmAddSuggestedNFT = () => { {origin}