Impossible to create proposals in Open Zeppelin Defender Admin dashboard if a function's parameters are multiple bool

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.

:computer: Environment

:memo:Details

:1234: Code to reproduce

Hi

Thanks for reporting and thanks for providing context.

I'll try to reproduce and create fix for this issue.

Best,
Zeljko

To help you as well, I tried to modify my function to take in a struct of bools, the issue gets worse:
It's impossible to click the create admin action button no matter what variables I check or uncheck:

    struct AllowedDaysOfTheWeek {
        bool monday;
        bool tuesday;
        bool wednesday;
        bool thursday;
        bool friday;
        bool saturday;
        bool sunday;
    }

    function configureAllowedDays(AllowedDaysOfTheWeek memory daysOfTheWeek)
        public
    {
        bool[7] memory configuredDays = [
            daysOfTheWeek.monday,
            daysOfTheWeek.tuesday,
            daysOfTheWeek.wednesday,
            daysOfTheWeek.thursday,
            daysOfTheWeek.friday,
            daysOfTheWeek.saturday,
            daysOfTheWeek.sunday
        ];
        for (uint8 i = 0; i < 7; i++) {
            _allowedDays[i] = configuredDays[i];
        }
    }

@elias_taz

Replying here also.

Fix is released.
Feel free to try it and to reach if any other issues.

Best,
Zeljko

1 Like