simplewallet: fix wrong amount in show_transfers for pending transactions

Change was not taken into consideration
This commit is contained in:
moneromooo-monero 2016-09-17 17:18:24 +01:00
parent 77224bbf48
commit 925086346a
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -3305,7 +3305,7 @@ bool simple_wallet::show_transfers(const std::vector<std::string> &args_)
for (std::list<std::pair<crypto::hash, tools::wallet2::unconfirmed_transfer_details>>::const_iterator i = upayments.begin(); i != upayments.end(); ++i) { for (std::list<std::pair<crypto::hash, tools::wallet2::unconfirmed_transfer_details>>::const_iterator i = upayments.begin(); i != upayments.end(); ++i) {
const tools::wallet2::unconfirmed_transfer_details &pd = i->second; const tools::wallet2::unconfirmed_transfer_details &pd = i->second;
uint64_t amount = pd.m_amount_in; uint64_t amount = pd.m_amount_in;
uint64_t fee = amount - pd.m_amount_out; uint64_t fee = amount - pd.m_amount_out - pd.m_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);
if (payment_id.substr(16).find_first_not_of('0') == std::string::npos) if (payment_id.substr(16).find_first_not_of('0') == std::string::npos)
payment_id = payment_id.substr(0,16); payment_id = payment_id.substr(0,16);