From a25e834bf26fca54839af2dc1248da82c9b458c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Aasted=20S=C3=B8rensen?= Date: Sat, 17 Aug 2019 14:23:33 +0200 Subject: [PATCH 1/2] Fix issue e-money/em-ledger#1 --- client/input/input.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/input/input.go b/client/input/input.go index 0ccf8c1b12aa..95f32281edd5 100644 --- a/client/input/input.go +++ b/client/input/input.go @@ -74,7 +74,12 @@ func GetConfirmation(prompt string, buf *bufio.Reader) (bool, error) { return false, err } - response = strings.ToLower(strings.TrimSpace(response)) + response = strings.TrimSpace(response) + if len(response) == 0 { + return false, nil + } + + response = strings.ToLower(response) if response[0] == 'y' { return true, nil } From 7bac1217d372dba09c8a20f76e057afaa5771690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Aasted=20S=C3=B8rensen?= Date: Sun, 18 Aug 2019 11:17:00 +0200 Subject: [PATCH 2/2] Added changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3851e45ae8f9..519a68800267 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,6 +78,7 @@ longer panics if the store to load contains substores that we didn't explicitly * (cli) [\#4763](https://github.com/cosmos/cosmos-sdk/issues/4763) Fix flag `--min-self-delegation` for staking `EditValidator` * (keys) Fix ledger custom coin type support bug * (simulation) [\#4912](https://github.com/cosmos/cosmos-sdk/issues/4912) Fix SimApp ModuleAccountAddrs to properly return black listed addresses for bank keeper initialization +* (cli) [\#4919](https://github.com/cosmos/cosmos-sdk/pull/4919) Don't crash cli if user doesn't answer y/n confirmation request ## [v0.36.0] - 2019-08-13