diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-10-28 19:13:42 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-11-14 17:06:26 +0000 |
commit | e89994e98f85be95d68c7bf471fcadf9aabbc93a (patch) | |
tree | 2cb9f29bc15e4488eeaeee81115d791babced4fc /src/rpc/rpc_args.cpp | |
parent | move input_line from command_line to simplewallet (diff) | |
download | monero-e89994e98f85be95d68c7bf471fcadf9aabbc93a.tar.xz |
wallet: rejig to avoid prompting in wallet2
wallet2 is a library, and should not prompt for stdin. Instead,
pass a function so simplewallet can prompt on stdin, and a GUI
might display a window, etc.
Diffstat (limited to '')
-rw-r--r-- | src/rpc/rpc_args.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/rpc_args.cpp b/src/rpc/rpc_args.cpp index 93309bf3c..e03c5472d 100644 --- a/src/rpc/rpc_args.cpp +++ b/src/rpc/rpc_args.cpp @@ -83,7 +83,9 @@ namespace cryptonote if (command_line::has_arg(vm, arg.rpc_login)) { - config.login = tools::login::parse(command_line::get_arg(vm, arg.rpc_login), true, "RPC server password"); + config.login = tools::login::parse(command_line::get_arg(vm, arg.rpc_login), true, [](bool verify) { + return tools::password_container::prompt(verify, "RPC server password"); + }); if (!config.login) return boost::none; |