Snow::buySnow()
A snow token is intended to be available for free once a week and can be bought at anytime, but an error in the logic to buy the token can stop the free token from being earned.
If a user buys a token before the free token has been earned, the timer for earning the free token is updated as if it has been earned, even though it hasn't.
Likelihood:
When a user buys snow token before the free token has been earned for the week
Impact:
The free token can't be earned.
Add the following test to the TestSnow
test suite.
This test shows that trying to earn the free token after a user buys a token reverts.
User Ashley
buys a token and another user Victory
tries to earn the free token for the week but got denied.
Don't update the earn timer when a token is bought.
When buySnow is successfully called, the global timer is reset. This inadvertently affects the earning of snow as that particular action also depends on the global timer.
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.