Function SpookySwap::setTreatCost
does not allow to update treat that has cost set to 0.
Function SpookySwap::setTreatCost
checks the current treat cost value for 0, but it should check the new value instead. This leads to not being able to update the treat cost if the current treat cost is 0.
If a treat was added with zero cost, the owner is unable to update the cost to any other value.
Manual review
Change the validation so that it checks the new cost value:
The cost of the treat is set only by the owner (in the constructor, in addTreat and in setTreatCost). That means the cost of the treat will always be greater than zero.
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.