Skip to content

Commit

Permalink
Take empty input as yes answer (#4565)
Browse files Browse the repository at this point in the history
Closes: #4564
  • Loading branch information
Alessio Treglia authored Jun 16, 2019
1 parent ac2e765 commit 18415ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .pending/improvements/sdk/4564-Allow-empty-ans
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#4564 Allow empty answer to evaluate as 'Y' on tx submission prompt.
2 changes: 1 addition & 1 deletion client/input/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 18415ee

Please sign in to comment.