Commit 12e052f8 authored by zeroleak's avatar zeroleak
Browse files

readUserInputRequired retry on empty input

parent 10a0d1ec
......@@ -210,7 +210,7 @@ public class CliService {
log.info(CliUtils.LOG_SEPARATOR);
log.info("⣿ AUTHENTICATION REQUIRED");
log.info("⣿ Whirlpool wallet is CLOSED.");
log.info("⣿ • Please type your seed passphrase to authenticate and start mixing.");
log.info("⣿ • Type your seed passphrase to authenticate and start mixing.");
return CliUtils.readUserInputRequired("Seed passphrase?", true);
}
......
......@@ -55,7 +55,11 @@ public class CliUtils {
public static String readUserInputRequired(String message, boolean secret) {
message = "⣿ INPUT REQUIRED ⣿ " + message;
return readUserInput(message, secret, true);
String input;
do {
input = readUserInput(message, secret, true);
} while (input == null);
return input;
}
public static String readUserInput(String message, boolean secret, boolean scannerFallback) {
......@@ -76,7 +80,7 @@ public class CliUtils {
if (line != null) {
line = line.trim();
if (line.isEmpty()) {
return null;
line = null;
}
}
return line;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment