feat: optional validate basic (#15735)
This commit is contained in:
+6
-1
@@ -40,7 +40,12 @@ func GenerateOrBroadcastTxWithFactory(clientCtx client.Context, txf Factory, msg
|
||||
// Right now, we're factorizing that call inside this function.
|
||||
// ref: https://github.com/cosmos/cosmos-sdk/pull/9236#discussion_r623803504
|
||||
for _, msg := range msgs {
|
||||
if err := msg.ValidateBasic(); err != nil {
|
||||
m, ok := msg.(sdk.HasValidateBasic)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
if err := m.ValidateBasic(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user