From 64e12ef0ba4c2c03686ce2b7cfc2d772eea0e3ef Mon Sep 17 00:00:00 2001 From: Preschian F Date: Wed, 12 Apr 2023 17:11:56 +0700 Subject: [PATCH] fix: get images on explorer collectibles for ksm --- components/collection/CollectionCard.vue | 7 ++++--- components/rmrk/service/scheme.ts | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/collection/CollectionCard.vue b/components/collection/CollectionCard.vue index 9e18a34cd9..4a21fee58a 100644 --- a/components/collection/CollectionCard.vue +++ b/components/collection/CollectionCard.vue @@ -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 || '' + ) }) diff --git a/components/rmrk/service/scheme.ts b/components/rmrk/service/scheme.ts index a9bec198ba..e1ef4cce3e 100644 --- a/components/rmrk/service/scheme.ts +++ b/components/rmrk/service/scheme.ts @@ -54,6 +54,8 @@ export interface Metadata { image?: string image_data?: string type?: string + thumbnailUri?: string + mediaUri?: string } export interface NFTMetadata extends Metadata, ItemResources {