If I buy a present for someone else, via buyPresent(suppose it was really buying the presents for the receiver)
this check will prevent them from taking their own present from santa.
For example Bob was an EXTRA_NICE user, collects his own present via "collectPresent" and buys a present for Alice, but Alice was also an EXTRA_NICE user and she hasn't collected her gift, but now her NFT balance is > 0 becauase Bob bought her a present resulting in Alice having to transfer this NFT to someone else to collect her own present:
Users can not collect their own present from santa.
Manual inspection
Add a mapping where you can store the addresses which has collected presents:
Definitely remove the balance check and make following changes when a present is collected via "collectPresent":
Relying on balanceOf > 0 in collectPresent() allows the msg.sender to send their present to another address and then collect again.
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.