Show unconfirmed balance on overview page
[novacoin.git] / src / qt / transactiontablemodel.cpp
index 6a7f7aa..17622e0 100644 (file)
@@ -4,6 +4,7 @@
 #include "guiconstants.h"
 #include "transactiondesc.h"
 #include "walletmodel.h"
+#include "addresstablemodel.h"
 
 #include "headers.h"
 
@@ -208,7 +209,7 @@ TransactionTableModel::TransactionTableModel(CWallet* wallet, WalletModel *paren
         walletModel(parent),
         priv(new TransactionTablePriv(wallet, this))
 {
-    columns << tr("Status") << tr("Date") << tr("Type") << tr("Address") << tr("Amount");
+    columns << QString() << tr("Date") << tr("Type") << tr("Address") << tr("Amount");
 
     priv->refreshWallet();
 
@@ -278,7 +279,7 @@ QVariant TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) con
         status = tr("Offline (%1 confirmations)").arg(wtx->status.depth);
         break;
     case TransactionStatus::Unconfirmed:
-        status = tr("Unconfirmed (%1/%2 confirmations)").arg(wtx->status.depth).arg(TransactionRecord::NumConfirmations);
+        status = tr("Unconfirmed (%1 of %2 confirmations required)").arg(wtx->status.depth).arg(TransactionRecord::NumConfirmations);
         break;
     case TransactionStatus::HaveConfirmations:
         status = tr("Confirmed (%1 confirmations)").arg(wtx->status.depth);
@@ -325,7 +326,7 @@ QVariant TransactionTableModel::formatTxDate(const TransactionRecord *wtx) const
  */
 QString TransactionTableModel::lookupAddress(const std::string &address) const
 {
-    QString label = walletModel->labelForAddress(QString::fromStdString(address));
+    QString label = walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(address));
     QString description;
     if(label.isEmpty())
     {
@@ -538,7 +539,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
     }
     else if (role == LabelRole)
     {
-        return walletModel->labelForAddress(QString::fromStdString(rec->address));
+        return walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(rec->address));
     }
     else if (role == AbsoluteAmountRole)
     {