mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-10 13:13:27 +01:00
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)
This commit is contained in:
commit
e48ef1684c
@ -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())
|
||||
|
@ -156,8 +156,8 @@ void TransactionHistoryImpl::refresh()
|
||||
const crypto::hash &hash = i->first;
|
||||
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 payment_id = string_tools::pod_to_hex(i->second.m_payment_id);
|
||||
|
Loading…
Reference in New Issue
Block a user