-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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(x/feegrant): add autocli options for tx #17959
Conversation
@julienrbrt your pull request is missing a changelog! |
@@ -48,8 +47,9 @@ func GetTxCmd(ac address.Codec) *cobra.Command { | |||
// NewCmdFeeGrant returns a CLI command handler to create a MsgGrantAllowance transaction. | |||
func NewCmdFeeGrant(ac address.Codec) *cobra.Command { |
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.
this needs to stay or can be removed as well?
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.
lets leave a comment on why this cant use autocli, same with other commands staying to prevent future people asking why and spending time on it
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.
There is already a comment in the PR description. Do you mean have a comment in the code?
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.
comment in the code
func findSubCommand(cmd *cobra.Command, subCmdName string) *cobra.Command { | ||
for _, subCmd := range cmd.Commands() { | ||
use := subCmd.Use | ||
if use == subCmdName || strings.HasPrefix(use, subCmdName+" ") { | ||
return subCmd | ||
} | ||
|
||
for _, alias := range subCmd.Aliases { |
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.
As discussed yesterday in our sync @atheeshp.
This way, we can prevent a command to be created by having an alias as well instead of having to use skip.
(cherry picked from commit 1d03d89) # Conflicts: # x/feegrant/client/cli/tx.go # x/feegrant/client/cli/tx_test.go
Description
Closes: #17958
Blocked on #17913Keeps the
grant
as it is superior to what can be done with AutoCLI and replacing it would be CLI breaking.Replaces the
revoke
command.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 change