From 9088d3236bbd3564914ec99589e3f99e58e4cffb Mon Sep 17 00:00:00 2001 From: SergiySW Date: Fri, 30 Jun 2017 10:16:05 +0300 Subject: [PATCH] GUI: change password with locked wallet & invalid unlock password --- rai/qt/qt.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/rai/qt/qt.cpp b/rai/qt/qt.cpp index 90e08cf2..d489997c 100755 --- a/rai/qt/qt.cpp +++ b/rai/qt/qt.cpp @@ -1158,6 +1158,16 @@ wallet (wallet_a) } } } + else + { + show_button_error (*change); + change->setText ("Wallet is locked, unlock it"); + this->wallet.node.alarm.add (std::chrono::system_clock::now () + std::chrono::seconds (5), [this] () + { + show_button_ok (*change); + change->setText ("Set/Change password"); + }); + } }); QObject::connect (change_rep, &QPushButton::released, [this] () { @@ -1217,6 +1227,18 @@ wallet (wallet_a) { password->clear (); } + else + { + show_line_error (*password); + show_button_error (*unlock); + unlock->setText ("Invalid password"); + this->wallet.node.alarm.add (std::chrono::system_clock::now () + std::chrono::seconds (5), [this] () + { + show_line_ok (*password); + show_button_ok (*unlock); + unlock->setText ("Unlock"); + }); + } }); QObject::connect (lock, &QPushButton::released, [this] () {