From 6926de807a2cee3183e02b2c7a5967375bcbc7aa Mon Sep 17 00:00:00 2001 From: Luke Ma Date: Sat, 13 Jan 2024 01:57:44 +0800 Subject: [PATCH] refactor: Remove ValidateBasic in cli (#470) --- x/rollapp/client/cli/tx_create_rollapp.go | 3 --- x/rollapp/client/cli/tx_update_state.go | 4 +--- x/sequencer/client/cli/tx_create_sequencer.go | 3 --- x/streamer/client/cli/tx_create_stream.go | 4 ---- x/streamer/client/cli/tx_replace_distribution.go | 4 ---- x/streamer/client/cli/tx_terminate_stream.go | 4 ---- x/streamer/client/cli/tx_update_distribution.go | 4 ---- 7 files changed, 1 insertion(+), 25 deletions(-) diff --git a/x/rollapp/client/cli/tx_create_rollapp.go b/x/rollapp/client/cli/tx_create_rollapp.go index b94824c2d..5cd8bb0b9 100644 --- a/x/rollapp/client/cli/tx_create_rollapp.go +++ b/x/rollapp/client/cli/tx_create_rollapp.go @@ -62,9 +62,6 @@ func CmdCreateRollapp() *cobra.Command { metadatas, ) - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/rollapp/client/cli/tx_update_state.go b/x/rollapp/client/cli/tx_update_state.go index 7659e87e3..23e5d6a6d 100644 --- a/x/rollapp/client/cli/tx_update_state.go +++ b/x/rollapp/client/cli/tx_update_state.go @@ -55,9 +55,7 @@ func CmdUpdateState() *cobra.Command { argVersion, argBDs, ) - if err := msg.ValidateBasic(); err != nil { - return err - } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/sequencer/client/cli/tx_create_sequencer.go b/x/sequencer/client/cli/tx_create_sequencer.go index c3063249e..518369c5b 100644 --- a/x/sequencer/client/cli/tx_create_sequencer.go +++ b/x/sequencer/client/cli/tx_create_sequencer.go @@ -50,9 +50,6 @@ func CmdCreateSequencer() *cobra.Command { return err } - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/streamer/client/cli/tx_create_stream.go b/x/streamer/client/cli/tx_create_stream.go index 9bb9b3c14..e4bd20864 100644 --- a/x/streamer/client/cli/tx_create_stream.go +++ b/x/streamer/client/cli/tx_create_stream.go @@ -74,10 +74,6 @@ func NewCmdSubmitCreateStreamProposal() *cobra.Command { return err } - if err = msg.ValidateBasic(); err != nil { - return err - } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) return tx.GenerateOrBroadcastTxWithFactory(clientCtx, txf, msg) }, diff --git a/x/streamer/client/cli/tx_replace_distribution.go b/x/streamer/client/cli/tx_replace_distribution.go index 90484f77f..39ac0093a 100644 --- a/x/streamer/client/cli/tx_replace_distribution.go +++ b/x/streamer/client/cli/tx_replace_distribution.go @@ -45,10 +45,6 @@ func NewCmdSubmitReplaceStreamDistributionProposal() *cobra.Command { return err } - if err = msg.ValidateBasic(); err != nil { - return err - } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) return tx.GenerateOrBroadcastTxWithFactory(clientCtx, txf, msg) }, diff --git a/x/streamer/client/cli/tx_terminate_stream.go b/x/streamer/client/cli/tx_terminate_stream.go index e65f722e5..d5f6a369a 100644 --- a/x/streamer/client/cli/tx_terminate_stream.go +++ b/x/streamer/client/cli/tx_terminate_stream.go @@ -41,10 +41,6 @@ func NewCmdSubmitTerminateStreamProposal() *cobra.Command { return err } - if err = msg.ValidateBasic(); err != nil { - return err - } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) return tx.GenerateOrBroadcastTxWithFactory(clientCtx, txf, msg) }, diff --git a/x/streamer/client/cli/tx_update_distribution.go b/x/streamer/client/cli/tx_update_distribution.go index e2ca443ba..f3e99bae7 100644 --- a/x/streamer/client/cli/tx_update_distribution.go +++ b/x/streamer/client/cli/tx_update_distribution.go @@ -45,10 +45,6 @@ func NewCmdSubmitUpdateStreamDistributionProposal() *cobra.Command { return err } - if err = msg.ValidateBasic(); err != nil { - return err - } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) return tx.GenerateOrBroadcastTxWithFactory(clientCtx, txf, msg) },