From aa20fc1cc61896ff2aae8ca0c8f0fd424d399ac9 Mon Sep 17 00:00:00 2001 From: daiagi Date: Thu, 19 Oct 2023 18:59:23 +0700 Subject: [PATCH 1/3] attributes --- src/mappings/shared/metadata.ts | 4 ++-- src/mappings/utils/types.ts | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/mappings/shared/metadata.ts b/src/mappings/shared/metadata.ts index 8701066..427b2be 100644 --- a/src/mappings/shared/metadata.ts +++ b/src/mappings/shared/metadata.ts @@ -4,7 +4,7 @@ import { Optional, TokenMetadata } from '@kodadot1/metasquid/types' import { logger } from '@kodadot1/metasquid/logger' import { MetadataEntity as Metadata } from '../../model/generated' import { fetchMetadata } from '../utils/metadata' -import { Store } from '../utils/types' +import { Store, attributeFrom } from '../utils/types' import { isEmpty } from '../utils/helper' export async function handleMetadata(id: string, store: Store): Promise> { @@ -26,7 +26,7 @@ export async function handleMetadata(id: string, store: Store): Promise( } } -// export function attributeFrom(attribute: MetadataAttribute): Attribute { -// return new Attribute({}, { -// display: String(attribute.display_type), -// trait: String(attribute.trait_type), -// value: String(attribute.value), -// }); -// } +export function attributeFrom(attribute: MetadataAttribute): Attribute { + return new Attribute( + {}, + { + display: attribute.display_type ? String(attribute.display_type) : null, + trait: String(attribute.trait_type), + value: String(attribute.value), + } + ) +} export type Store = EntityManager export type Context = EventHandlerContext From 264417ea39209e36c9a3e5b30d2fbe950fe6e1fe Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 19 Oct 2023 14:54:01 +0200 Subject: [PATCH 2/3] :wrench: speck v6 --- speck.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speck.yaml b/speck.yaml index f124acb..19ba5b3 100644 --- a/speck.yaml +++ b/speck.yaml @@ -1,6 +1,6 @@ manifestVersion: subsquid.io/v0.1 name: speck -version: 5 +version: 6 description: 'SubSquid indexer for Uniques and Assets on Statemint' build: deploy: From b89ce34602f78bc85c9de90ec13d9327a457cb63 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Thu, 19 Oct 2023 14:54:54 +0200 Subject: [PATCH 3/3] :wrench: stick v6 --- squid.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/squid.yaml b/squid.yaml index 7b5f39f..9a06380 100644 --- a/squid.yaml +++ b/squid.yaml @@ -1,6 +1,6 @@ manifestVersion: subsquid.io/v0.1 name: stick -version: 5 +version: 6 description: 'SubSquid indexer for Uniques and Assets on Statemine' build: deploy: