Malleable keys: remove version byte
[novacoin.git] / src / qt / walletmodel.cpp
index d0620ca..47b12e9 100644 (file)
@@ -117,6 +117,9 @@ void WalletModel::checkBalanceChanged()
 
 void WalletModel::updateTransaction(const QString &hash, int status)
 {
+    if(transactionTableModel)
+        transactionTableModel->updateTransaction(hash, status);
+
     // Balance and number of transactions might have changed
     checkBalanceChanged();
 
@@ -125,9 +128,6 @@ void WalletModel::updateTransaction(const QString &hash, int status)
     {
         cachedNumTransactions = newNumTransactions;
         emit numTransactionsChanged(newNumTransactions);
-
-        if(transactionTableModel)
-            transactionTableModel->updateTransaction(hash, status);
     }
 }
 
@@ -332,11 +332,6 @@ bool WalletModel::changePassphrase(const SecureString &oldPass, const SecureStri
     return retval;
 }
 
-void WalletModel::getStakeStats(float &nKernelsRate, float &nCoinDaysRate)
-{
-    wallet->GetStakeStats(nKernelsRate, nCoinDaysRate);
-}
-
 void WalletModel::getStakeWeightFromValue(const int64_t& nTime, const int64_t& nValue, uint64_t& nWeight)
 {
     wallet->GetStakeWeightFromValue(nTime, nValue, nWeight);
@@ -500,10 +495,11 @@ void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
             cout = COutput(&wallet->mapWallet[cout.tx->vin[0].prevout.hash], cout.tx->vin[0].prevout.n, 0, true);
         }
 
-        CTxDestination address;
-        if(!out.fSpendable || !ExtractDestination(cout.tx->vout[cout.i].scriptPubKey, address))
+        std::string address;
+        if(!out.fSpendable || !wallet->ExtractAddress(cout.tx->vout[cout.i].scriptPubKey, address))
             continue;
-        mapCoins[CBitcoinAddress(address).ToString().c_str()].push_back(out);
+
+        mapCoins[address.c_str()].push_back(out);
     }
 }