Merge PR #1195: gaiacli - Add error message for when account isn't found

This commit is contained in:
Dev Ojha
2018-06-09 08:40:22 +02:00
committed by Christopher Goes
parent a277ba91c7
commit 9c4bbf7dfd
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -52,6 +52,12 @@ func GetAccountCmd(storeName string, cdc *wire.Codec, decoder auth.AccountDecode
return err
}
// Check if account was found
if res == nil {
return sdk.ErrUnknownAddress("No account with address " + addr +
" was found in the state.\nAre you sure there has been a transaction involving it?")
}
// decode the value
account, err := decoder(res)
if err != nil {