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
+1
View File
@@ -8,6 +8,7 @@ FEATURES
IMPROVEMENTS
* export command now writes current validator set for Tendermint
* [tests] Application module tests now use a mock application
* [gaiacli] Fix error message when account isn't found when running gaiacli account
FIXES
* [lcd] Switch to bech32 for addresses on all human readable inputs and outputs
+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 {