From 9c4bbf7dfda0a80e6bced24294985e6dd0ae5717 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Fri, 8 Jun 2018 23:40:22 -0700 Subject: [PATCH] Merge PR #1195: gaiacli - Add error message for when account isn't found --- CHANGELOG.md | 1 + x/auth/client/cli/account.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7da9d60d7d..79432a9713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/x/auth/client/cli/account.go b/x/auth/client/cli/account.go index b5af6a686a..e82b074148 100644 --- a/x/auth/client/cli/account.go +++ b/x/auth/client/cli/account.go @@ -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 {