wallet_api: fix wrong amount in tx history

This commit is contained in:
moneromooo-monero 2016-10-15 13:56:25 +01:00
parent b5f20012d3
commit 2d7083ca56
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 1 additions and 1 deletions

View File

@ -156,8 +156,8 @@ void TransactionHistoryImpl::refresh()
const crypto::hash &hash = i->first; const crypto::hash &hash = i->first;
const tools::wallet2::confirmed_transfer_details &pd = i->second; const tools::wallet2::confirmed_transfer_details &pd = i->second;
uint64_t fee = pd.m_amount_in - pd.m_amount_out;
uint64_t change = pd.m_change == (uint64_t)-1 ? 0 : pd.m_change; // change may not be known uint64_t change = pd.m_change == (uint64_t)-1 ? 0 : pd.m_change; // change may not be known
uint64_t fee = pd.m_amount_in - pd.m_amount_out - change;
std::string payment_id = string_tools::pod_to_hex(i->second.m_payment_id); std::string payment_id = string_tools::pod_to_hex(i->second.m_payment_id);