mirror of
https://github.com/monero-project/monero.git
synced 2025-08-11 12:00:18 -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
|
@ -82,7 +82,7 @@ namespace tools
|
|||
\return The username and password, or boost::none if
|
||||
`password_container::prompt` fails.
|
||||
*/
|
||||
static boost::optional<login> parse(std::string&& userpass, bool verify, const char* message = "Password");
|
||||
static boost::optional<login> parse(std::string&& userpass, bool verify, const std::function<boost::optional<password_container>(bool)> &prompt);
|
||||
|
||||
login(const login&) = delete;
|
||||
login(login&&) = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue