Skip to content

Commit

Permalink
Merge pull request kodadot#5613 from kodadot/fix/get-images-on-explor…
Browse files Browse the repository at this point in the history
…er-collection-ksm

fix: get images on explorer collectibles for ksm
  • Loading branch information
yangwao committed Apr 12, 2023
2 parents ca014b9 + 64e12ef commit 662272c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/collection/CollectionCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ const image = ref('')
onMounted(async () => {
const metadata = (await processSingleMetadata(
props.collection.metadata,
true
props.collection.metadata
)) as Metadata
image.value = sanitizeIpfsUrl(metadata.image || '')
image.value = sanitizeIpfsUrl(
metadata.image || metadata.thumbnailUri || metadata.mediaUri || ''
)
})
</script>
2 changes: 2 additions & 0 deletions components/rmrk/service/scheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export interface Metadata {
image?: string
image_data?: string
type?: string
thumbnailUri?: string
mediaUri?: string
}

export interface NFTMetadata extends Metadata, ItemResources {
Expand Down

0 comments on commit 662272c

Please sign in to comment.