fix(explorer): fix error on mint pages related to NFTs (#20922)

This commit is contained in:
Josh 2021-10-23 13:50:26 -07:00 committed by GitHub
parent 63f94a4db3
commit 89caf65966
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 12 deletions

View File

@ -237,6 +237,7 @@ async function fetchAccountInfo(
const parsed = create(info, TokenAccount);
let nftData;
try {
// Generate a PDA and check for a Metadata Account
if (parsed.type === "mint") {
const metadata = await Metadata.load(
@ -252,6 +253,10 @@ async function fetchAccountInfo(
nftData = { metadata: metadata.data, editionInfo };
}
}
} catch (error) {
// unable to find NFT metadata account
}
data = {
program: result.data.program,
parsed,