nft-marketplace-box icon indicating copy to clipboard operation
nft-marketplace-box copied to clipboard

TypeError: Cannot read properties of undefined (reading 'length')

Open felipegerhardt opened this issue 2 years ago • 0 comments

Hi,

I wonder why this error happens when creating a NFT:

pages/create-and-list-nft.js (82:40) @ _callee$

  80 | let listingFee = await marketPlaceContract.methods.LISTING_FEE().call()
  81 | listingFee = listingFee.toString()
> 82 | boredPetsContract.methods.mint(url).send({ from: accounts[0] }).on('receipt', function (receipt) {
     |                                    ^
  83 |     console.log('minted');
  84 |     // List the NFT
  85 |     const tokenId = receipt.events.NFTMinted.returnValues[0];

felipegerhardt avatar Feb 26 '23 01:02 felipegerhardt