_updateOwnershipInfo
function in KittyConnect.sol
contract does not update the s_ownerToCatsTokenId
of the previous owner and leave the tokenId in the array of the previous owner does not erase it.
_updateOwnershipInfo
function in KittyConnect.sol
contract does not update the s_ownerToCatsTokenId
of the previous owner correctly. It pushes the tokenId to the array of the new owner and does not erase the tokenId from the array of the previous owner which create conflict that the tokenId is owned by two owners at the same time.
this test shows that size size of the array remains the same after the transfer of the token to the new owner from previous owner.
paste this test in kittyTest.t.sol .
run this test by this command
the tokenId is owned by two owners at the same time which is not correct.
same tokenId present in the array of the previous owner and the new owner which we can see by this getCatsTokenIdOwnedBy
function
Can create problem in bridging the token to other network.
Manual review
Here is the updated code which fix the s_ownerToCatsTokenId of the previous owner correctly. By erasing the tokenId from the array of the previous owner.
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.