No check for `id != 0` in many functions
Closed this issue · 1 comments
adhusson commented
Several functions will accept the id 0. It is better to add a 0 check in _validateId
(or better: don't check id
at all and check vesting.receiver != address(0)
).
It would not only match the behavior of DssVest, it would prevent can setting bits on the vesting with id 0 using protect
for instance:
vest.protect(0);
Vest.Vesting memory vesting = vest.getVesting(0);
assertTrue(vesting.protected); // works
MerlinEgalite commented
Good idea!