Open code423n4 opened 2 years ago
== true
_requireDelegatorOrRepresentative()
https://github.com/pooltogether/v4-twab-delegator/blob/master/contracts/TWABDelegator.sol#L583
Since the representatives mapping evaluates to a boolean, its comparison against true is redundant.
representatives
true
require( _delegator == msg.sender || representatives[_delegator][msg.sender], "TWABDelegator/not-delegator-or-rep" );
Duplicate of: https://github.com/code-423n4/2022-02-pooltogether-findings/issues/15
G01: TWABDelegator: Remove
== true
comparison in_requireDelegatorOrRepresentative()
Line References
https://github.com/pooltogether/v4-twab-delegator/blob/master/contracts/TWABDelegator.sol#L583
Description
Since the
representatives
mapping evaluates to a boolean, its comparison againsttrue
is redundant.Recommended Mitigation Steps