Take empty input as yes answer (#4565)

Closes: #4564
This commit is contained in:
Alessio Treglia 2019-06-16 12:06:39 +02:00 committed by GitHub
parent ac2e765607
commit 18415eedaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
#4564 Allow empty answer to evaluate as 'Y' on tx submission prompt.

View File

@ -98,7 +98,7 @@ func GetConfirmation(prompt string, buf *bufio.Reader) (bool, error) {
}
response = strings.ToLower(strings.TrimSpace(response))
if response == "y" || response == "yes" {
if response == "y" || response == "yes" || response == "" {
return true, nil
} else if response == "n" || response == "no" {
return false, nil