When a user wants to bridge NFT to another chain bridgeNftToAnotherChain
function removes tokenId from s_ownerToCatsTokenId
. It saves pop the last element in case if idx
== length of array or moves the last element to the position of the removed element which is defined by idx
filed in catInfo struct. However, in the last case, it doesn't update the idx of the token which leads to removing the wrong element from array if the user wants to then transfer the last element, because idx will be more than the array length.
High
Update the idx
of the last element when removing it.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.