-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(x/group): check the new admin address when updating the group policy admin #18350
refactor(x/group): check the new admin address when updating the group policy admin #18350
Conversation
…admin, add unit tests
WalkthroughThe changes introduced add a new layer of validation for updating group and group policy admins in the Changes
Poem
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files selected for processing (2)
- x/group/keeper/msg_server.go (1 hunks)
- x/group/keeper/msg_server_test.go (2 hunks)
Additional comments: 3
x/group/keeper/msg_server_test.go (2)
666-674: The test case for an invalid new admin address is correctly set up. The expected error message should match the one returned by the function when an invalid address is provided.
1229-1245: The test case for an invalid new admin address in the group policy is correctly set up. The expected error message should match the one returned by the function when an invalid address is provided.
x/group/keeper/msg_server.go (1)
- 429-434: The check for the new admin address being the same as the old one and the validation of the new admin address are good additions for ensuring data integrity and preventing unnecessary operations.
Check the new admin address when updating the group policy admin.
Description
Closes: #XXXX
Check the new admin address when updating the group policy admin. Add relevant unit test cases.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
make lint
andmake test
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking changeSummary by CodeRabbit
Bug Fixes:
UpdateGroupPolicyAdmin
function to ensure only valid addresses can be set as the new admin for a group policy, enhancing the security and integrity of group policy administration.Tests: