added support for AUDIT, BURN, STAKE TXs to PendingTransaction wallet API
This commit is contained in:
@@ -166,9 +166,15 @@ uint64_t PendingTransactionImpl::amount() const
|
||||
{
|
||||
uint64_t result = 0;
|
||||
for (const auto &ptx : m_pending_tx) {
|
||||
if (ptx.m_tx.type == cryptonote::transaction_type::AUDIT ||
|
||||
ptx.m_tx.type == cryptonote::transaction_type::BURN ||
|
||||
ptx.m_tx.type == cryptonote::transaction_type::STAKE) {
|
||||
result += ptx.m_tx.amount_burnt;
|
||||
} else {
|
||||
for (const auto &dest : ptx.dests) {
|
||||
result += dest.amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user