From 94bea35e5569c323a667d8204bc2d23b15d4dc29 Mon Sep 17 00:00:00 2001 From: warrows Date: Fri, 29 Mar 2019 17:12:44 +0100 Subject: [PATCH] [QT] Fix a display bug about zPIV mints When opening the zPIV coin selection in privacy tab, if the wallet is locked the message for all mints is that the seed is wrong. This commit fixes it by replacing the message and stating that the locked wallet prevents precomputation and spending. --- src/qt/zpivcontroldialog.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qt/zpivcontroldialog.cpp b/src/qt/zpivcontroldialog.cpp index 08c5c45412cb7..99ebc2df3af0b 100644 --- a/src/qt/zpivcontroldialog.cpp +++ b/src/qt/zpivcontroldialog.cpp @@ -140,6 +140,8 @@ void ZPivControlDialog::updateList() string strReason = ""; if(nConfirmations < Params().Zerocoin_MintRequiredConfirmations()) strReason = strprintf("Needs %d more confirmations", Params().Zerocoin_MintRequiredConfirmations() - nConfirmations); + else if (model->getEncryptionStatus() == WalletModel::EncryptionStatus::Locked) + strReason = "Your wallet is locked. Impossible to precompute or spend zPIV."; else if (!mint.isSeedCorrect) strReason = "The zPIV seed used to mint this zPIV is not the same as currently hold in the wallet"; else