explorer falls back to token list when uri is blank and tokenDetails exists (#26800)

explorer fallback to token list when uri is blank and tokenDetails exists

Co-authored-by: Arrowana <8245419+Arrowana@users.noreply.github.com>
This commit is contained in:
Pierre 2022-07-27 13:28:05 +10:00 committed by GitHub
parent cd4340ed06
commit 8015aedfdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -195,10 +195,13 @@ export function AccountHeader({
let token;
let unverified = false;
if (data?.nftData) {
// Fall back to legacy token list when there is stub metadata (blank uri), updatable by default by the mint authority
if (!data?.nftData?.metadata.data.uri && tokenDetails) {
token = tokenDetails;
} else if (data?.nftData) {
token = {
logoURI: data?.nftData?.json?.image,
name: data?.nftData?.json?.name,
name: data?.nftData?.json?.name ?? data?.nftData.metadata.data.name,
};
unverified = true;
} else if (tokenDetails) {