aboutsummaryrefslogtreecommitdiff
path: root/src/libwalletqt
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-01-12 19:57:30 +0100
committerJaquee <jaquee.monero@gmail.com>2017-01-14 00:45:09 +0100
commit205bfcdd7bf051440cda231fc49e7f58d8c1a7ee (patch)
treef3fedbc7964bb9585b5ab901eb6388e00821549b /src/libwalletqt
parent593839a374f6fb69df84d1cda5261ed246e9028f (diff)
downloadmonzero-gui-205bfcdd7bf051440cda231fc49e7f58d8c1a7ee.tar.gz
monzero-gui-205bfcdd7bf051440cda231fc49e7f58d8c1a7ee.tar.xz
monzero-gui-205bfcdd7bf051440cda231fc49e7f58d8c1a7ee.zip
History: Show num of confirmations + unconfirmed payments
history: refresh on new block
Diffstat (limited to 'src/libwalletqt')
-rw-r--r--src/libwalletqt/TransactionInfo.cpp5
-rw-r--r--src/libwalletqt/TransactionInfo.h2
-rw-r--r--src/libwalletqt/Wallet.cpp6
-rw-r--r--src/libwalletqt/Wallet.h1
4 files changed, 14 insertions, 0 deletions
diff --git a/src/libwalletqt/TransactionInfo.cpp b/src/libwalletqt/TransactionInfo.cpp
index ed73a29f..71df2b02 100644
--- a/src/libwalletqt/TransactionInfo.cpp
+++ b/src/libwalletqt/TransactionInfo.cpp
@@ -46,6 +46,11 @@ quint64 TransactionInfo::blockHeight() const
return m_pimpl->blockHeight();
}
+quint64 TransactionInfo::confirmations() const
+{
+ return m_pimpl->confirmations();
+}
+
QString TransactionInfo::hash() const
{
return QString::fromStdString(m_pimpl->hash());
diff --git a/src/libwalletqt/TransactionInfo.h b/src/libwalletqt/TransactionInfo.h
index 6d9fc270..30418b88 100644
--- a/src/libwalletqt/TransactionInfo.h
+++ b/src/libwalletqt/TransactionInfo.h
@@ -18,6 +18,7 @@ class TransactionInfo : public QObject
Q_PROPERTY(QString displayAmount READ displayAmount)
Q_PROPERTY(QString fee READ fee)
Q_PROPERTY(quint64 blockHeight READ blockHeight)
+ Q_PROPERTY(quint64 confirmations READ confirmations)
Q_PROPERTY(QString hash READ hash)
Q_PROPERTY(QDateTime timestamp READ timestamp)
Q_PROPERTY(QString date READ date)
@@ -42,6 +43,7 @@ public:
QString displayAmount() const;
QString fee() const;
quint64 blockHeight() const;
+ quint64 confirmations() const;
//! transaction_id
QString hash() const;
QDateTime timestamp() const;
diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp
index 5bf75788..62c71110 100644
--- a/src/libwalletqt/Wallet.cpp
+++ b/src/libwalletqt/Wallet.cpp
@@ -44,6 +44,12 @@ public:
emit m_wallet->moneyReceived(QString::fromStdString(txId), amount);
}
+ virtual void unconfirmedMoneyReceived(const std::string &txId, uint64_t amount)
+ {
+ qDebug() << __FUNCTION__;
+ emit m_wallet->unconfirmedMoneyReceived(QString::fromStdString(txId), amount);
+ }
+
virtual void newBlock(uint64_t height)
{
// qDebug() << __FUNCTION__;
diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h
index 24bdc15b..9f9ed3e1 100644
--- a/src/libwalletqt/Wallet.h
+++ b/src/libwalletqt/Wallet.h
@@ -206,6 +206,7 @@ signals:
void moneySpent(const QString &txId, quint64 amount);
void moneyReceived(const QString &txId, quint64 amount);
+ void unconfirmedMoneyReceived(const QString &txId, quint64 amount);
void newBlock(quint64 height);
void historyModelChanged() const;