@@ -3,16 +3,12 @@ import { SignedPayload721WithQuantitySignature } from "@thirdweb-dev/sdk";
3
3
import { BigNumber } from "ethers" ;
4
4
import { FastifyInstance } from "fastify" ;
5
5
import { StatusCodes } from "http-status-codes" ;
6
- import {
7
- Address ,
8
- Hex ,
9
- defineChain ,
10
- getContract as getContractV5 ,
11
- } from "thirdweb" ;
6
+ import { Address , Hex , getContract as getContractV5 } from "thirdweb" ;
12
7
import { mintWithSignature } from "thirdweb/extensions/erc721" ;
13
8
import { resolvePromisedValue } from "thirdweb/utils" ;
14
9
import { queueTx } from "../../../../../../db/transactions/queueTx" ;
15
10
import { getContract } from "../../../../../../utils/cache/getContract" ;
11
+ import { getChain } from "../../../../../../utils/chain" ;
16
12
import { maybeBigInt } from "../../../../../../utils/primitiveTypes" ;
17
13
import { thirdwebClient } from "../../../../../../utils/sdk" ;
18
14
import { insertTransaction } from "../../../../../../utils/transaction/insertTransaction" ;
@@ -103,7 +99,7 @@ export async function erc721SignatureMint(fastify: FastifyInstance) {
103
99
const payloadV5 = payload as Static < typeof signature721OutputSchemaV5 > ;
104
100
const contract = getContractV5 ( {
105
101
client : thirdwebClient ,
106
- chain : defineChain ( chainId ) ,
102
+ chain : await getChain ( chainId ) ,
107
103
address : contractAddress ,
108
104
} ) ;
109
105
const transaction = mintWithSignature ( {
0 commit comments