From 925086346abdb379be5686f7f577c4db08730cc8 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 17 Sep 2016 17:18:24 +0100 Subject: [PATCH] simplewallet: fix wrong amount in show_transfers for pending transactions Change was not taken into consideration --- src/simplewallet/simplewallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 2c1d4096..7b0fae4d 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -3305,7 +3305,7 @@ bool simple_wallet::show_transfers(const std::vector &args_) for (std::list>::const_iterator i = upayments.begin(); i != upayments.end(); ++i) { const tools::wallet2::unconfirmed_transfer_details &pd = i->second; 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); if (payment_id.substr(16).find_first_not_of('0') == std::string::npos) payment_id = payment_id.substr(0,16);