From 1047f60d3c19caa2aea9271a75a2eb27402843c0 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Wed, 30 Oct 2019 13:57:38 -0700 Subject: [PATCH] Handle empty password/cancel --- src/controller.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/controller.cpp b/src/controller.cpp index 75c16e0..da5f522 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -420,7 +420,12 @@ void Controller::unlockIfEncrypted(std::function cb, std::functiontr("Wallet Password"), - main->tr("Please enter your wallet password"), QLineEdit::Password); + main->tr("Your wallet is encrypted.\nPlease enter your wallet password"), QLineEdit::Password); + + if (password.isEmpty()) { + error(); + return; + } zrpc->unlockWallet(password, [=](json reply) { if (isJsonSuccess(reply)) {