forked from Public/monero-gui
Subaddresses minimal version: supports default account only
This commit is contained in:
@@ -22,7 +22,7 @@ TransactionInfo *TransactionHistory::transaction(int index)
|
||||
// return nullptr;
|
||||
//}
|
||||
|
||||
QList<TransactionInfo *> TransactionHistory::getAll() const
|
||||
QList<TransactionInfo *> TransactionHistory::getAll(quint32 accountIndex) const
|
||||
{
|
||||
// XXX this invalidates previously saved history that might be used by model
|
||||
emit refreshStarted();
|
||||
@@ -37,6 +37,10 @@ QList<TransactionInfo *> TransactionHistory::getAll() const
|
||||
TransactionHistory * parent = const_cast<TransactionHistory*>(this);
|
||||
for (const auto i : m_pimpl->getAll()) {
|
||||
TransactionInfo * ti = new TransactionInfo(i, parent);
|
||||
if (ti->subaddrAccount() != accountIndex) {
|
||||
delete ti;
|
||||
continue;
|
||||
}
|
||||
m_tinfo.append(ti);
|
||||
// looking for transactions timestamp scope
|
||||
if (ti->timestamp() >= lastDateTime) {
|
||||
@@ -69,12 +73,12 @@ QList<TransactionInfo *> TransactionHistory::getAll() const
|
||||
return m_tinfo;
|
||||
}
|
||||
|
||||
void TransactionHistory::refresh()
|
||||
void TransactionHistory::refresh(quint32 accountIndex)
|
||||
{
|
||||
// rebuilding transaction list in wallet_api;
|
||||
m_pimpl->refresh();
|
||||
// copying list here and keep track on every item to avoid memleaks
|
||||
getAll();
|
||||
getAll(accountIndex);
|
||||
}
|
||||
|
||||
quint64 TransactionHistory::count() const
|
||||
|
||||
Reference in New Issue
Block a user