Merge pull request #5131

d2c95ab9 Don't decrypt keys in view only wallets in wallet_keys_unlocker (Doyle)
This commit is contained in:
Riccardo Spagni 2019-03-04 21:28:09 +02:00
commit 66014706bb
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -892,7 +892,7 @@ wallet_keys_unlocker::wallet_keys_unlocker(wallet2 &w, const boost::optional<too
w(w),
locked(password != boost::none)
{
if (!locked || w.is_unattended() || w.ask_password() != tools::wallet2::AskPasswordToDecrypt)
if (!locked || w.is_unattended() || w.ask_password() != tools::wallet2::AskPasswordToDecrypt || w.watch_only())
{
locked = false;
return;