chore: fix all linting (#24101)
This commit is contained in:
@@ -79,7 +79,7 @@ func makeMultiSignCmd() func(cmd *cobra.Command, args []string) (err error) {
|
||||
}
|
||||
parsedTx, err := authclient.ReadTxFromFile(clientCtx, args[0])
|
||||
if err != nil {
|
||||
return
|
||||
return err
|
||||
}
|
||||
|
||||
txFactory, err := tx.NewFactoryCLI(clientCtx, cmd.Flags())
|
||||
|
||||
@@ -60,7 +60,7 @@ account key. It implies --signature-only.
|
||||
|
||||
flags.AddTxFlagsToCmd(cmd)
|
||||
|
||||
cmd.MarkFlagRequired(flags.FlagFrom)
|
||||
_ = cmd.MarkFlagRequired(flags.FlagFrom)
|
||||
|
||||
return cmd
|
||||
}
|
||||
@@ -147,7 +147,10 @@ func makeSignBatchCmd() func(cmd *cobra.Command, args []string) error {
|
||||
msgs = append(msgs, unsignedStdTx.GetMsgs()...)
|
||||
}
|
||||
// set the new appened msgs into builder
|
||||
txBuilder.SetMsgs(msgs...)
|
||||
err := txBuilder.SetMsgs(msgs...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// set the memo,fees,feeGranter,feePayer from cmd flags
|
||||
txBuilder.SetMemo(txFactory.Memo())
|
||||
@@ -319,7 +322,7 @@ func setOutputFile(cmd *cobra.Command) (func(), error) {
|
||||
|
||||
cmd.SetOut(fp)
|
||||
|
||||
return func() { fp.Close() }, nil
|
||||
return func() { _ = fp.Close() }, nil
|
||||
}
|
||||
|
||||
// GetSignCommand returns the transaction sign command.
|
||||
@@ -352,7 +355,7 @@ be generated via the 'multisign' command.
|
||||
cmd.Flags().String(flags.FlagOutputDocument, "", "The document will be written to the given file instead of STDOUT")
|
||||
flags.AddTxFlagsToCmd(cmd)
|
||||
|
||||
cmd.MarkFlagRequired(flags.FlagFrom)
|
||||
_ = cmd.MarkFlagRequired(flags.FlagFrom)
|
||||
|
||||
return cmd
|
||||
}
|
||||
@@ -361,8 +364,8 @@ func preSignCmd(cmd *cobra.Command, _ []string) {
|
||||
// Conditionally mark the account and sequence numbers required as no RPC
|
||||
// query will be done.
|
||||
if offline, _ := cmd.Flags().GetBool(flags.FlagOffline); offline {
|
||||
cmd.MarkFlagRequired(flags.FlagAccountNumber)
|
||||
cmd.MarkFlagRequired(flags.FlagSequence)
|
||||
_ = cmd.MarkFlagRequired(flags.FlagAccountNumber)
|
||||
_ = cmd.MarkFlagRequired(flags.FlagSequence)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user