-
Notifications
You must be signed in to change notification settings - Fork 332
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
feat(community): add MsgUpdateParams for governance #1745
Conversation
|
||
if s.keeper.GetAuthority().String() != msg.Authority { | ||
return nil, errors.Wrapf( | ||
govtypes.ErrInvalidSigner, |
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.
Do you think it's worth using an error defined in the community module (or a generic one like sdk.ErrUnauthorized) instead of the gov one?
Removing the govtypes import would avoid coupling to the gov module (making it easier to swap out gov for another implementation). Also the authority doesn't strictly need to be the gov module account but the error message implies it should be.
Downsides are that it would differ from the sdk modules, which use the gov error.
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.
Hmm I think for now we can be consistent with other modules -- if we switch out gov later then we should also be able to update the error response then, assuming a gov switchout is a significant breaking change
Description
MsgUpdateParams
and message handlerChecklist