Merge PR #1841: Must specify amount flag
* Removed default value for staking. Must now specify amount flag or it will error * add to pending and better error msg
This commit is contained in:
parent
12ef51dc7a
commit
74e06d8b96
|
@ -55,3 +55,4 @@ BUG FIXES
|
|||
* \#1766 Fixes bad example for keybase identity
|
||||
* \#1804 Fixes gen-tx genesis generation logic temporarily until upstream updates
|
||||
* \#1799 Fix `gaiad export`
|
||||
* \#1828 Force user to specify amount on create-validator command by removing default
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue