Describe the bug
I want to rule a safe contract A with a roled address B, and B can only call transfer method with less than 10 usdt from the balances of A without the permission from A's owners. After the contract of Role Modifier is created. I'm to add target and member. Then I met the bug.
Uint256 param can not be rule with less than or greater than when initializing a role with target contract address and there's only 2 options can be selected, that is "equals to" and "is one of". The only way works i found is to set the uint256 param's rule with "equal to" in the first transaction, and then re-enter the setting of role modifier, then the other 2 options "greater than" and "less than".
To Reproduce
Steps to reproduce the behavior:
1 Enter the zodiac web2 pages from Safe Web2 (app.safe.global)
2 Select Role Modifier and Execute the safe transaction using the 2 default contract address;
3 Click "edit roles" from the left panel "Modules and Modifiers"
4 Click "create a role" button
5 Click "Add a Target" from the left panel
6 Enter the contract address of USDT "0xc2132d05d31c914a87c6611c10748aeb04b58e8f" and Click "Add target"
7 Un-Select the checkbox "Allow all calls to target" from the right panel
8 Find the method "transfer" and click the "down arrow"
9 Click the button "add a condition" besides the second param "amount (uint256)"
10 Then we can see there's no choice that called "less than" or "greater than"
Expected behavior
All the 4 options are required to be listed when initializing a role with target contract.
Screenshots / logs
when i rule a new role, only "equals" and "is one of" can be selected
the second image is when i update a existed role, now all of it's options of uint256 are shown
Relevant environment details:
OS: [elementaryOS 7]
Browser [e.g. chrome 22, safari]
Additional context
The problem exists both in the online version of Safe Web2 Console, and also in the code tag "v1.0.6".
I checked the source code of v1.0.6 and follow the flow of problem occurs, It seems that the react code treat all the function params as UNSUPPORTED native type rather than the type "address" or "uint256" when initializing a role with target contract address, and then it's CONDITION_OPTIONS results into default options "equals to" and "is one of", see line 85 in file TargetFunctionParams.tsx
Describe the bug I want to rule a safe contract A with a roled address B, and B can only call transfer method with less than 10 usdt from the balances of A without the permission from A's owners. After the contract of Role Modifier is created. I'm to add target and member. Then I met the bug.
Uint256 param can not be rule with less than or greater than when initializing a role with target contract address and there's only 2 options can be selected, that is "equals to" and "is one of". The only way works i found is to set the uint256 param's rule with "equal to" in the first transaction, and then re-enter the setting of role modifier, then the other 2 options "greater than" and "less than".
To Reproduce Steps to reproduce the behavior: 1 Enter the zodiac web2 pages from Safe Web2 (app.safe.global) 2 Select Role Modifier and Execute the safe transaction using the 2 default contract address; 3 Click "edit roles" from the left panel "Modules and Modifiers" 4 Click "create a role" button 5 Click "Add a Target" from the left panel 6 Enter the contract address of USDT "0xc2132d05d31c914a87c6611c10748aeb04b58e8f" and Click "Add target" 7 Un-Select the checkbox "Allow all calls to target" from the right panel 8 Find the method "transfer" and click the "down arrow" 9 Click the button "add a condition" besides the second param "amount (uint256)" 10 Then we can see there's no choice that called "less than" or "greater than"
Expected behavior All the 4 options are required to be listed when initializing a role with target contract.
Screenshots / logs
when i rule a new role, only "equals" and "is one of" can be selected
the second image is when i update a existed role, now all of it's options of uint256 are shown
Relevant environment details:
Additional context