Skip to content

Commit 859ed74

Browse files
[TOOL-2900]: Fix metadata.attributes being ignored (#824)
1 parent 996bb28 commit 859ed74

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/server/routes/contract/extensions/erc1155/write/mint-to.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Type, type Static } from "@sinclair/typebox";
1+
import { type Static, Type } from "@sinclair/typebox";
22
import type { FastifyInstance } from "fastify";
33
import { StatusCodes } from "http-status-codes";
44
import { getContract } from "thirdweb";
@@ -105,7 +105,7 @@ export async function erc1155mintTo(fastify: FastifyInstance) {
105105
animation_url: metadata.animation_url ?? undefined,
106106
external_url: metadata.external_url ?? undefined,
107107
background_color: metadata.background_color ?? undefined,
108-
properties: metadata.properties,
108+
properties: metadata.properties || metadata.attributes,
109109
};
110110
const transaction = mintTo({
111111
contract,

src/server/routes/contract/extensions/erc721/write/mint-to.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Type, type Static } from "@sinclair/typebox";
1+
import { type Static, Type } from "@sinclair/typebox";
22
import type { FastifyInstance } from "fastify";
33
import { StatusCodes } from "http-status-codes";
44
import { getContract } from "thirdweb";
@@ -100,7 +100,7 @@ export async function erc721mintTo(fastify: FastifyInstance) {
100100
animation_url: metadata.animation_url ?? undefined,
101101
external_url: metadata.external_url ?? undefined,
102102
background_color: metadata.background_color ?? undefined,
103-
properties: metadata.properties,
103+
properties: metadata.properties || metadata.attributes,
104104
};
105105
const transaction = mintTo({
106106
contract,

0 commit comments

Comments
 (0)