aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet/simplewallet.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-10-22 22:11:12 +0200
committerRiccardo Spagni <ric@spagni.net>2016-10-22 22:11:12 +0200
commite48ef1684c0235d59b8c14bd743a9f06a38b0695 (patch)
treee5b0745a8234d381ebc96d5c52e9c3b883490507 /src/simplewallet/simplewallet.cpp
parentMerge pull request #1218 (diff)
parentwallet_api: fix wrong amount in tx history (diff)
downloadmonero-e48ef1684c0235d59b8c14bd743a9f06a38b0695.tar.xz
Merge pull request #1219
2d7083c wallet_api: fix wrong amount in tx history (moneromooo-monero) b5f2001 simplewallet: fix wrong amount in show_transfers (moneromooo-monero)
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
-rw-r--r--src/simplewallet/simplewallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 639fcb4b6..a51765aec 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -3845,8 +3845,8 @@ bool simple_wallet::show_transfers(const std::vector<std::string> &args_)
m_wallet->get_payments_out(payments, min_height, max_height);
for (std::list<std::pair<crypto::hash, tools::wallet2::confirmed_transfer_details>>::const_iterator i = payments.begin(); i != payments.end(); ++i) {
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 fee = pd.m_amount_in - pd.m_amount_out - change;
std::string dests;
for (const auto &d: pd.m_dests) {
if (!dests.empty())