Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Throw better error on wrong tokenId type
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbo committed Nov 2, 2023
1 parent c95bbca commit 57c4e20
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions utils/fetchLsp8Metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,9 @@ export const fetchLsp8Metadata = async (
case Lsp8TokenIdType.ADDRESS:
return await lsp8MetadataGetter('address', tokenId.slice(0, 42))
default:
return {
LSP4Metadata: {
description: '',
links: [],
images: [[]],
icon: [],
assets: [],
},
}
throw new Error(
`Unsupported LSP8 tokenIdType '${tokenIdType}' for '${assetAddress}' asset`
)
}
} catch (error) {
console.error(error)
Expand Down

0 comments on commit 57c4e20

Please sign in to comment.