mirror of
https://github.com/monero-project/monero.git
synced 2025-08-24 01:35:01 -04:00
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.
This commit is contained in:
parent
ec5135e5b7
commit
e89994e98f
8 changed files with 97 additions and 78 deletions
|
@ -247,7 +247,12 @@ int main(int argc, char const * argv[])
|
|||
if (command_line::has_arg(vm, arg.rpc_login))
|
||||
{
|
||||
login = tools::login::parse(
|
||||
command_line::get_arg(vm, arg.rpc_login), false, "Daemon client password"
|
||||
command_line::get_arg(vm, arg.rpc_login), false, [](bool verify) {
|
||||
#ifdef HAVE_READLINE
|
||||
rdln::suspend_readline pause_readline;
|
||||
#endif
|
||||
return tools::password_container::prompt(verify, "Daemon client password");
|
||||
}
|
||||
);
|
||||
if (!login)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue