I am emitting the following in a solidity smart contract.
emit Transfer(address(0), to, tokenId)
In my front-end JavaScript code, I am reading the values as follows:
let transfer = receipt.events.Transfer.returnValues.tokenId
If I declare my event using only the tokenId parameter (as below) in my smart contract, I am receiving the values of all three parameters of the emit in my front-end and everything works properly.
event Transfer(uint256 tokenId);
However, if I declare the event as follows with the three parameters, following the standard practice, I am no longer receiving any values and it no longer works!
event Transfer(address indexed from, address indexed to, uint256 tokenId);