The strict equality check does not account for a contract balance greater than the 'totalFees' amount. This can lead to that amount being frozen.
Also, the error message is not accurate.
Here is a scenario
The raffle is played as intended and the winner is payed out. Now the fee recipient wants to collect their share
Somebody either by accident or just to be mean decides to send even a small amount of ETH to the contract.
The remaining balance is no longer exactly equal to the 'totalFees' amount and the function reverts. Now the fee recipient gets nothing and the funds are locked in the contract
Furthermore, even if step 3 never happened, this relies on the math in selectWinner() to execute perfectly without even a tiny fraction of a mistake in accounting.
High - This can directly lead to a loss of funds for feeRecipient
Manual Inspection
Change the check from '==' to '>=', this way we can always get our fees as long as the contract has enough ETH to cover it. Also change the message something more relevant.
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.