Extend fWalletUnlockMintOnly to GUI 1/head
authorTranz5 <Tranz5@users.noreply.github.com>
Sat, 8 Feb 2014 01:51:20 +0000 (20:51 -0500)
committerTranz5 <Tranz5@users.noreply.github.com>
Sat, 8 Feb 2014 01:51:20 +0000 (20:51 -0500)
src/qt/walletmodel.cpp

index df006a3..ac8b68f 100644 (file)
@@ -356,6 +356,13 @@ void WalletModel::unsubscribeFromCoreSignals()
 WalletModel::UnlockContext WalletModel::requestUnlock()
 {
     bool was_locked = getEncryptionStatus() == Locked;
+    
+    if ((!was_locked) && fWalletUnlockMintOnly)
+    {
+       setWalletLocked(true);
+       was_locked = getEncryptionStatus() == Locked;
+
+    }
     if(was_locked)
     {
         // Request UI to unlock wallet
@@ -364,7 +371,7 @@ WalletModel::UnlockContext WalletModel::requestUnlock()
     // If wallet is still locked, unlock was failed or cancelled, mark context as invalid
     bool valid = getEncryptionStatus() != Locked;
 
-    return UnlockContext(this, valid, was_locked);
+    return UnlockContext(this, valid, was_locked && !fWalletUnlockMintOnly);
 }
 
 WalletModel::UnlockContext::UnlockContext(WalletModel *wallet, bool valid, bool relock):