Skip to content

Commit 987ea6d

Browse files
committed
dns image priority
1 parent 4395bbd commit 987ea6d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pkg/api/nft_converters.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ func (h *Handler) convertNFT(ctx context.Context, item core.NftItem, book addres
4646
}))
4747
}
4848
var image, description string
49+
if item.Metadata != nil {
50+
if imageI, prs := item.Metadata["image"]; prs {
51+
image, _ = imageI.(string)
52+
}
53+
if descriptionI, prs := item.Metadata["description"]; prs {
54+
description, _ = descriptionI.(string)
55+
}
56+
}
4957
if item.CollectionAddress != nil {
5058
cInfo, _ := metaCache.getCollectionMeta(ctx, *item.CollectionAddress)
5159
if cc, prs := book.GetCollectionInfoByAddress(*item.CollectionAddress); prs {
@@ -66,14 +74,6 @@ func (h *Handler) convertNFT(ctx context.Context, item core.NftItem, book addres
6674
nftItem.Metadata["buttons"] = buttons
6775
}
6876
}
69-
if item.Metadata != nil {
70-
if imageI, prs := item.Metadata["image"]; prs {
71-
image, _ = imageI.(string)
72-
}
73-
if descriptionI, prs := item.Metadata["description"]; prs {
74-
description, _ = descriptionI.(string)
75-
}
76-
}
7777
if len(nftItem.ApprovedBy) > 0 && nftItem.Verified {
7878
nftItem.Trust = oas.TrustType(core.TrustWhitelist)
7979
} else {

0 commit comments

Comments
 (0)