Skip to content

Commit

Permalink
refactor: remove ValidateBasic in cli (#2971)
Browse files Browse the repository at this point in the history
The `ValidateBasic` function has been called in the
`GenerateOrBroadcastTxWithFactory` function, so we no longer need to add
the `ValidateBasic` function when writing Cli. Related PRs can be viewed
at: cosmos/cosmos-sdk#9236 (comment)
  • Loading branch information
lukema95 authored Jan 2, 2024
1 parent 5400fea commit 3e494b1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions x/blobstream/client/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ send a new message overriding the previous one.
ValidatorAddress: valAddress,
EvmAddress: evmAddress,
}
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
Expand Down
6 changes: 0 additions & 6 deletions x/upgrade/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ func CmdSignalVersion() *cobra.Command {
valAddr := sdk.ValAddress(addr)

msg := types.NewMsgSignalVersion(valAddr, version)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
Expand All @@ -75,9 +72,6 @@ to the signalled version at the following height.
}

msg := types.NewMsgTryUpgrade(clientCtx.GetFromAddress())
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
Expand Down

0 comments on commit 3e494b1

Please sign in to comment.