From 94cfbb19fc05097144f1544fdab7d1135f026593 Mon Sep 17 00:00:00 2001 From: Fabien egg O'Carroll Date: Fri, 3 Dec 2021 21:16:22 +0200 Subject: [PATCH] Added fallback for NFT title when name is missing no-issue Some NFT's are created without a title, for example the Bored Ape Yacht Club collection does not name the tokens, instead just referring to them by ID. This change falls back to the token_id, which is unqiue within the collection to support these tokens. --- core/server/services/nft-oembed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/services/nft-oembed.js b/core/server/services/nft-oembed.js index d975ea0b47..48e9d6d322 100644 --- a/core/server/services/nft-oembed.js +++ b/core/server/services/nft-oembed.js @@ -46,7 +46,7 @@ class NFTOEmbedProvider { return { version: '1.0', type: 'nft', - title: result.body.name, + title: result.body.name ? result.body.name : `#${result.body.token_id}`, author_name: result.body.creator.user.username, author_url: `https://opensea.io/${result.body.creator.user.username}`, provider_name: 'OpenSea',