Skip to content

Commit 07d25ef

Browse files
feat: add name field to ExplorerWearableMetadata and update buildTrimmedEntity function (#456)
- Introduced a new 'name' property in ExplorerWearableMetadata type. - Updated buildTrimmedEntity function to include 'name' in the returned ExplorerWearableEntity metadata.
1 parent 8c18de6 commit 07d25ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/logic/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export type ExplorerWearableRepresentation = {
88

99
export type ExplorerWearableMetadata = {
1010
id: string
11+
name: string
1112
rarity?: Rarity
1213
isSmart?: boolean
1314
data: {
@@ -75,7 +76,7 @@ export function sanitizeContractList(thirdPartyProviders: ThirdPartyProvider[])
7576
}
7677
}
7778

78-
export function buildTrimmedEntity({ entity, itemType, individualData }: MixedWearable): ExplorerWearableEntity {
79+
export function buildTrimmedEntity({ entity, itemType, individualData, name }: MixedWearable): ExplorerWearableEntity {
7980
const thumbnailFile = entity?.metadata?.thumbnail as string | undefined
8081
const thumbnailHash = entity?.content?.find((c) => c.file === thumbnailFile)?.hash
8182
const metadata = entity?.metadata
@@ -91,6 +92,7 @@ export function buildTrimmedEntity({ entity, itemType, individualData }: MixedWe
9192
individualData,
9293
metadata: {
9394
id: metadata?.id,
95+
name,
9496
rarity: metadata?.rarity,
9597
isSmart,
9698
data: {

0 commit comments

Comments
 (0)