Skip to content

Commit

Permalink
Move NewTxCmd to controller/cli.go (cosmos#2249)
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton authored Sep 9, 2022
1 parent fcdb0fc commit bf51287
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
20 changes: 20 additions & 0 deletions modules/apps/27-interchain-accounts/controller/client/cli/cli.go
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

0 comments on commit bf51287

Please sign in to comment.