I'm trying to execute an admin function in OpenZeppelin Defender Admin.
The function is the following:
function configureAllowedDays(
bool monday,
bool tuesday,
bool wednesday,
bool thursday,
bool friday,
bool saturday,
bool sunday
) public onlyRole(ADMIN_ROLE) {
bool[7] memory configuredDays = [
monday,
tuesday,
wednesday,
thursday,
friday,
saturday,
sunday
];
for (uint8 i = 0; i < 7; i++) {
_allowedDays[i] = configuredDays[i];
}
}
The reason this function isn't optimized is to facilitate admin actions in the Open Zeppelin Admin dashboard. So that an admin supervisor can just click to toggle allowed days!
If one tries to click half the checkboxes and leave the rest unchecked, the "Create admin actions" button is disabled! I can't set some values to false
.
Environment
Details
Code to reproduce