Merge pull request #3369

1979d53d wallet: fixes and tweaks to the save_watch_only command (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2018-03-14 13:37:14 +02:00
commit 3bc2537f5a
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
3 changed files with 18 additions and 8 deletions

View file

@ -3150,7 +3150,17 @@ bool simple_wallet::save_watch_only(const std::vector<std::string> &args/* = std
return true;
}
m_wallet->write_watch_only_wallet(m_wallet_file, pwd_container->password());
try
{
std::string new_keys_filename;
m_wallet->write_watch_only_wallet(m_wallet_file, pwd_container->password(), new_keys_filename);
success_msg_writer() << tr("Watch only wallet saved as: ") << new_keys_filename;
}
catch (const std::exception &e)
{
fail_msg_writer() << tr("Failed to save watch only wallet: ") << e.what();
return true;
}
return true;
}