From 3982eea8c7221e0733faaa3e9763e6cb5f527eab Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:52:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A3=80=E6=9F=A5owner?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/chain/contract/Locker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/chain/contract/Locker.js b/src/components/chain/contract/Locker.js index aa7d090..6ef4d2f 100644 --- a/src/components/chain/contract/Locker.js +++ b/src/components/chain/contract/Locker.js @@ -84,8 +84,8 @@ export class Locker { return txHash } async execUnlock(provider, chainId, nft, tokenIds) { + const nftContract = new ethers.Contract(nft, erc721Abi, provider.getSigner()) for (let tokenId of tokenIds) { - const nftContract = new ethers.Contract(nft, erc721Abi, provider.getSigner()) const owner = await nftContract.ownerOf(tokenId) if (owner.toLowerCase() != lockAddressImtbl.toLowerCase() && owner.toLowerCase() != lockAddressMain.toLowerCase()) { throw new Error('params mismatch, perhaps one transaction is pending')