Skip to content
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

Move NewTxCmd to controller/cli.go #2249

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package cli

import (
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
)

// GetQueryCmd returns the query commands for the ICA controller submodule
Expand All @@ -20,3 +22,21 @@ func GetQueryCmd() *cobra.Command {

return queryCmd
}

// NewTxCmd creates and returns the tx command
func NewTxCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "controller",
Short: "ica controller transactions subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}

cmd.AddCommand(
newRegisterAccountCmd(),
newSubmitTxCmd(),
)

return cmd
}
18 changes: 0 additions & 18 deletions modules/apps/27-interchain-accounts/controller/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,6 @@ const (
flagPacketTimeoutTimestamp = "packet-timeout-timestamp"
)

// NewTxCmd creates and returns the tx command
func NewTxCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "controller",
Short: "ica controller transactions subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}

cmd.AddCommand(
newRegisterAccountCmd(),
newSubmitTxCmd(),
)

return cmd
}

func newRegisterAccountCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "register [connection-id]",
Expand Down