diff --git a/PENDING.md b/PENDING.md index 9a92a7c0f9d..ec7941b86fa 100644 --- a/PENDING.md +++ b/PENDING.md @@ -54,4 +54,5 @@ BUG FIXES * \#1787 Fixed bug where Tally fails due to revoked/unbonding validator * \#1766 Fixes bad example for keybase identity * \#1804 Fixes gen-tx genesis generation logic temporarily until upstream updates -* \#1799 Fix `gaiad export` \ No newline at end of file +* \#1799 Fix `gaiad export` +* \#1828 Force user to specify amount on create-validator command by removing default \ No newline at end of file diff --git a/x/stake/client/cli/flags.go b/x/stake/client/cli/flags.go index 8f17ca4d077..3d5e90b3510 100644 --- a/x/stake/client/cli/flags.go +++ b/x/stake/client/cli/flags.go @@ -37,7 +37,7 @@ var ( func init() { fsPk.String(FlagPubKey, "", "Go-Amino encoded hex PubKey of the validator. For Ed25519 the go-amino prepend hex is 1624de6220") - fsAmount.String(FlagAmount, "1steak", "Amount of coins to bond") + fsAmount.String(FlagAmount, "", "Amount of coins to bond") fsShares.String(FlagSharesAmount, "", "Amount of source-shares to either unbond or redelegate as a positive integer or decimal") fsShares.String(FlagSharesPercent, "", "Percent of source-shares to either unbond or redelegate as a positive integer or decimal >0 and <=1") fsDescriptionCreate.String(FlagMoniker, "", "validator name") diff --git a/x/stake/client/cli/tx.go b/x/stake/client/cli/tx.go index bfcd2ccac8f..218c1f5567b 100644 --- a/x/stake/client/cli/tx.go +++ b/x/stake/client/cli/tx.go @@ -24,7 +24,11 @@ func GetCmdCreateValidator(cdc *wire.Codec) *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { ctx := context.NewCoreContextFromViper().WithDecoder(authcmd.GetAccountDecoder(cdc)) - amount, err := sdk.ParseCoin(viper.GetString(FlagAmount)) + amounstStr := viper.GetString(FlagAmount) + if amounstStr == "" { + return fmt.Errorf("Must specify amount to stake using --amount") + } + amount, err := sdk.ParseCoin(amounstStr) if err != nil { return err }