Handle blank passwords/cancel.

Fixes #10
This commit is contained in:
Aditya Kulkarni
2019-10-31 09:55:48 -07:00
parent 58c80aaf81
commit 0a99730fba
2 changed files with 18 additions and 1 deletions

View File

@@ -462,6 +462,9 @@ void Controller::unlockIfEncrypted(std::function<void(void)> cb, std::function<v
zrpc->unlockWallet(password, [=](json reply) {
if (isJsonSuccess(reply)) {
cb();
// Refresh the wallet so the encryption status is now in sync.
refresh(true);
} else {
QMessageBox::critical(main, main->tr("Wallet Decryption Failed"),
QString::fromStdString(reply["error"].get<json::string_t>()),