forked from Public/monero-gui
Simple transaction history
This commit is contained in:
@@ -2,11 +2,18 @@
|
||||
#include "TransactionInfo.h"
|
||||
#include <wallet/wallet2_api.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
TransactionInfo *TransactionHistory::transaction(int index)
|
||||
{
|
||||
// box up Bitmonero::TransactionInfo
|
||||
Bitmonero::TransactionInfo * impl = m_pimpl->transaction(index);
|
||||
if (!impl) {
|
||||
qCritical("%s: no transaction info for index %d", __FUNCTION__, index);
|
||||
qCritical("%s: there's %d transactions in backend", __FUNCTION__, m_pimpl->count());
|
||||
return nullptr;
|
||||
}
|
||||
TransactionInfo * result = new TransactionInfo(impl, this);
|
||||
return result;
|
||||
}
|
||||
@@ -34,6 +41,7 @@ QList<TransactionInfo *> TransactionHistory::getAll() const
|
||||
void TransactionHistory::refresh()
|
||||
{
|
||||
// XXX this invalidates previously saved history that might be used by clients
|
||||
|
||||
emit refreshStarted();
|
||||
m_pimpl->refresh();
|
||||
emit refreshFinished();
|
||||
|
||||
Reference in New Issue
Block a user