Merge PR #1570: stake/client: Fix panic on if validator doesn't exist
This commit is contained in:
commit
1f3ab377ae
|
@ -103,6 +103,7 @@ BUG FIXES
|
|||
* \#1258 - printing big.rat's can no longer overflow int64
|
||||
* \#887 - limit the size of rationals that can be passed in from user input
|
||||
* \#1461 - CLI tests now no longer reset your local environment data
|
||||
* \#1505 - `gaiacli stake validator` no longer panics if validator doesn't exist
|
||||
|
||||
## 0.19.0
|
||||
|
||||
|
|
|
@ -31,8 +31,9 @@ func GetCmdQueryValidator(storeName string, cdc *wire.Codec) *cobra.Command {
|
|||
res, err := ctx.QueryStore(key, storeName)
|
||||
if err != nil {
|
||||
return err
|
||||
} else if len(res) == 0 {
|
||||
return fmt.Errorf("No validator found with address %s", args[0])
|
||||
}
|
||||
|
||||
validator := types.MustUnmarshalValidator(cdc, addr, res)
|
||||
|
||||
switch viper.Get(cli.OutputFlag) {
|
||||
|
|
Loading…
Reference in New Issue