diff --git a/x/auth/client/cli/tx_multisign.go b/x/auth/client/cli/tx_multisign.go index 938fc6823..58002e4a1 100644 --- a/x/auth/client/cli/tx_multisign.go +++ b/x/auth/client/cli/tx_multisign.go @@ -50,7 +50,7 @@ recommended to set such parameters manually. } cmd.Flags().Bool(flagSigOnly, false, "Print only the generated signature, then exit") - cmd.Flags().String(flagOutfile, "", "The document will be written to the given file instead of STDOUT") + cmd.Flags().String(flags.FlagOutputDocument, "", "The document will be written to the given file instead of STDOUT") // Add the flags here and return the command return flags.PostCommands(cmd)[0] @@ -131,13 +131,13 @@ func makeMultiSignCmd(cdc *codec.Codec) func(cmd *cobra.Command, args []string) return err } - if viper.GetString(flagOutfile) == "" { + if viper.GetString(flags.FlagOutputDocument) == "" { fmt.Printf("%s\n", json) return } fp, err := os.OpenFile( - viper.GetString(flagOutfile), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644, + viper.GetString(flags.FlagOutputDocument), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644, ) if err != nil { return err diff --git a/x/auth/client/cli/tx_sign.go b/x/auth/client/cli/tx_sign.go index c6bed8b84..adc3ef8a2 100644 --- a/x/auth/client/cli/tx_sign.go +++ b/x/auth/client/cli/tx_sign.go @@ -18,7 +18,6 @@ const ( flagMultisig = "multisig" flagAppend = "append" flagSigOnly = "signature-only" - flagOutfile = "output-document" ) // GetSignCommand returns the transaction sign command. @@ -55,7 +54,7 @@ be generated via the 'multisign' command. "Append the signature to the existing ones. If disabled, old signatures would be overwritten. Ignored if --multisig is on", ) cmd.Flags().Bool(flagSigOnly, false, "Print only the generated signature, then exit") - cmd.Flags().String(flagOutfile, "", "The document will be written to the given file instead of STDOUT") + cmd.Flags().String(flags.FlagOutputDocument, "", "The document will be written to the given file instead of STDOUT") cmd = flags.PostCommands(cmd)[0] cmd.MarkFlagRequired(flags.FlagFrom) @@ -108,13 +107,13 @@ func makeSignCmd(cdc *codec.Codec) func(cmd *cobra.Command, args []string) error return err } - if viper.GetString(flagOutfile) == "" { + if viper.GetString(flags.FlagOutputDocument) == "" { fmt.Printf("%s\n", json) return nil } fp, err := os.OpenFile( - viper.GetString(flagOutfile), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644, + viper.GetString(flags.FlagOutputDocument), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644, ) if err != nil { return err