Bugfix: Unspendable inputs handling
[novacoin.git] / src / walletdb.cpp
index 1519ff3..32dc595 100644 (file)
@@ -287,14 +287,14 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
                     wss.fAnyUnordered = true;
             }
         }
-        else if (strType == "watch")
+        else if (strType == "watchs")
         {
-            std::string strAddress;
-            ssKey >> strAddress;
+            CScript script;
+            ssKey >> script;
             char fYes;
             ssValue >> fYes;
             if (fYes == '1')
-                pwallet->LoadWatchOnly(CBitcoinAddress(strAddress).Get());
+                pwallet->LoadWatchOnly(script);
 
             // Watch-only addresses have no birthday information for now,
             // so set the wallet birthday to the beginning of time.