diff options
| author | Ilya Kitaev <mbg033@gmail.com> | 2016-10-04 23:12:58 +0300 |
|---|---|---|
| committer | Ilya Kitaev <mbg033@gmail.com> | 2016-10-10 00:15:17 +0300 |
| commit | 522b0671adf946bb4def414f1bbdbca492cf0cd6 (patch) | |
| tree | 104fef4388b6007527e7d4a42e541842b98f0a24 /src/libwalletqt/Wallet.cpp | |
| parent | 9cc92bf9d69652104b28e0907de12d83cfadaa20 (diff) | |
| download | monzero-gui-522b0671adf946bb4def414f1bbdbca492cf0cd6.tar.gz monzero-gui-522b0671adf946bb4def414f1bbdbca492cf0cd6.tar.xz monzero-gui-522b0671adf946bb4def414f1bbdbca492cf0cd6.zip | |
Simple transaction history
Diffstat (limited to 'src/libwalletqt/Wallet.cpp')
| -rw-r--r-- | src/libwalletqt/Wallet.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 9f0908b9..39d40a17 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -40,12 +40,14 @@ public: virtual void newBlock(uint64_t height) { // qDebug() << __FUNCTION__; + m_wallet->m_history->refresh(); emit m_wallet->newBlock(height); } virtual void updated() { qDebug() << __FUNCTION__; + m_wallet->m_history->refresh(); emit m_wallet->updated(); } @@ -53,6 +55,7 @@ public: virtual void refreshed() { qDebug() << __FUNCTION__; + emit m_wallet->refreshed(); } @@ -166,6 +169,7 @@ quint64 Wallet::daemonBlockChainTargetHeight() const bool Wallet::refresh() { bool result = m_walletImpl->refresh(); + m_history->refresh(); if (result) emit updated(); return result; @@ -205,10 +209,10 @@ void Wallet::disposeTransaction(PendingTransaction *t) TransactionHistory *Wallet::history() { - if (!m_history) { - Bitmonero::TransactionHistory * impl = m_walletImpl->history(); - m_history = new TransactionHistory(impl, this); - } +// if (m_history->count() == 0) { +// m_history->refresh(); +// } + return m_history; } @@ -252,6 +256,7 @@ Wallet::Wallet(Bitmonero::Wallet *w, QObject *parent) , m_daemonBlockChainHeight(0) , m_daemonBlockChainHeightTtl(DAEMON_BLOCKCHAIN_HEIGHT_CACHE_TTL_SECONDS) { + m_history = new TransactionHistory(m_walletImpl->history(), this); m_walletImpl->setListener(new WalletListenerImpl(this)); } |
