Skip to content

Commit

Permalink
Merge pull request #321 from kodadot/fix/incorrect-attributes
Browse files Browse the repository at this point in the history
🐛 inccorrectly handling attributest
  • Loading branch information
vikiival authored Oct 13, 2024
2 parents 1fadd0f + 3596512 commit 39ac052
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mappings/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Attribute } from '../../model/generated/_attribute'
import { Interaction } from '../../model'
import { SetMetadata } from '../nfts/types'
import { COLLECTION_OFFER } from '../../environment'
import { type Attribute as HyperAttribute, attributeFrom as hyperAttributeFrom } from '@kodadot1/hyperdata'

export type BaseCall = {
caller: string
Expand Down Expand Up @@ -99,12 +100,12 @@ export function eventFrom<T>(
}
}

export function attributeFrom(attribute: MetadataAttribute): Attribute {
export function attributeFrom(attribute: HyperAttribute): Attribute {
return new Attribute(
{},
{
display: attribute.display_type ? String(attribute.display_type) : null,
trait: String(attribute.trait_type),
display: attribute.display ? String(attribute.display) : null,
trait: attribute.trait ? String(attribute.trait) : null,
value: String(attribute.value),
}
)
Expand Down

0 comments on commit 39ac052

Please sign in to comment.