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 f74dd27e9..d3e4aa6ad 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}