From e26fc46ec070f241f45c7a1927d844d8e3275be9 Mon Sep 17 00:00:00 2001 From: SergiySW Date: Sat, 9 Sep 2017 23:54:54 +0300 Subject: [PATCH] GUI: unlock wallet with empty password at startup --- rai/qt/qt.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rai/qt/qt.cpp b/rai/qt/qt.cpp index a398d255..fe87bdf0 100755 --- a/rai/qt/qt.cpp +++ b/rai/qt/qt.cpp @@ -1083,7 +1083,7 @@ void rai_qt::wallet::start () this_l->push_main_stack (this_l->send_blocks_window); } }); - node.observers.blocks.add ([this_w] (rai::block const &, rai::account const & account_a, rai::amount const &) + node.observers.blocks.add ([this_w] (std::shared_ptr , rai::account const & account_a, rai::amount const &) { if (auto this_l = this_w.lock ()) { @@ -1237,9 +1237,10 @@ void rai_qt::wallet::update_connected () void rai_qt::wallet::empty_password () { - rai::raw_key empty; - empty.data.clear (); - wallet_m->store.password.value_set (empty); + this->node.alarm.add (std::chrono::system_clock::now () + std::chrono::seconds (3), [this] () + { + wallet_m->enter_password (std::string ("")); + }); } void rai_qt::wallet::change_rendering_ratio (rai::uint128_t const & rendering_ratio_a)