GUI: change password with locked wallet & invalid unlock password

This commit is contained in:
SergiySW 2017-06-30 10:16:05 +03:00
commit 9088d3236b

View file

@ -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] ()
{