Normally, weather classification should follow a consistent approach to simplify interpretation and reduce errors.
However, in this implementation, a hardcoded check for weather_id === 800
is performed outside the general classification logic using weather_id_x
, which can lead to inconsistent or missed classifications.
Likelihood:
This will occur whenever the weather condition is "clear" (id 800), which is a common condition in many regions.
If weather_id
is mistakenly not equal to 800 exactly (e.g., forecast-specific codes like 801), the logic will skip the clear
case and fall into the default (else
block, returning 4
for "windy").
Impact:
Leads to incorrect weather categorization.
Can cause downstream logic relying on this enum to behave incorrectly (e.g., smart contract logic or payouts depending on weather conditions).
None
Consider changing the weather_id
variable by weather_id_x
and changing the 800
value to another one that is not used already.
Or restructure the condition tree for consistency:
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.