Skip to content

Commit

Permalink
add dynamic errors & logs
Browse files Browse the repository at this point in the history
  • Loading branch information
fhildeb committed Feb 23, 2024
1 parent 046cd96 commit dd145c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions digital-assets/base-uri-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,15 @@ async function fetchBaseURI(tokenID: string, tokenIdFormat: number) {
);
} catch (err) {
console.error(
'Could not check for LSP8 interface. Please provide an LSP8 asset address.',
`Could not check if address ${SAMPLE_LSP8_ASSET} supports interface ${INTERFACE_IDS.LSP8IdentifiableDigitalAsset}, is it a smart contract address?`,
);
return;
}

if (!isLSP8) {
console.log('Asset is not an LSP8.');
console.log(
`Contract: ${SAMPLE_LSP8_ASSET} does not support the LSP8 interface ID: ${INTERFACE_IDS.LSP8IdentifiableDigitalAsset}.`,
);
return;
}

Expand Down

0 comments on commit dd145c1

Please sign in to comment.