I’m watching tutorial and already in this part: https://youtu.be/hiw95uyOiN0?list=PLFPZ8ai7J-iR6DMqBfZwJGc0vaNZPbJDv&t=440
and when I inspected the element these happened.
the problem is " return receipt.events.Transfer.returnValues.tokenId; "
I’m wondering why Transfer is undefined when I console.log and returnValues is not showing.
here is my code:
mintNft = async (metadataUrl) => {
const receipt = await tokenContract.methods.createNft(metadataUrl).send({from: ethereum.selectedAddress});
console.log(“receipt only”,receipt);
return receipt.events.Transfer.returnValues.tokenId;
}