TransactionInfo: fix balance delta for incoming txs

This commit is contained in:
tobtoht 2021-10-04 18:33:58 +02:00
parent e512e539b6
commit 3721665ea6
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -28,8 +28,14 @@ bool TransactionInfo::isCoinbase() const
quint64 TransactionInfo::balanceDelta() const quint64 TransactionInfo::balanceDelta() const
{ {
if (m_direction == Direction_In) {
return m_amount;
}
else if (m_direction == Direction_Out) {
return m_amount + m_fee; return m_amount + m_fee;
} }
return m_amount;
}
double TransactionInfo::amount() const double TransactionInfo::amount() const
{ {