Fix bug allowing anyone to cancel an admin renounce#4238
Conversation
|
|
We should have an additional unit test for this scenario. |
| ); | ||
| }); | ||
|
|
||
| it('no op if renouncing when not having the role', async function () { |
There was a problem hiding this comment.
Small NIT:
| it('no op if renouncing when not having the role', async function () { | |
| it('no-ops if renouncing when not having the role', async function () { |
I personally like to read the tests as it('<verb> ... (eg. it('does something ...'))
frangio
left a comment
There was a problem hiding this comment.
Note that the test description was updated but is still not following Ernesto's suggestion. But IMO we should come back to this later, there are many tests throughout that are following a different format.
Agree, it's a minor readability improvement but a suggestion as well, not mandatory. Will try to enforce this in my reviews but don't feel we need to update every test written the same way |
Co-authored-by: Francisco Giordano <fg@frang.io> (cherry picked from commit 3ec4307)
Changes introduced in #4230 include a bug allowing anyone to reset the schedule of an admin renounce:
if (role == DEFAULT_ADMIN_ROLE)passesnewDefaultAdmin == address(0)is truedelete _pendingDefaultAdminScheduleSo Bob was able to
delete _pendingDefaultAdminSchedule, which shouldn't have been possible