diff --git a/src/wallet/wallets_manager.cpp b/src/wallet/wallets_manager.cpp index 64acba2e..a65a14d6 100644 --- a/src/wallet/wallets_manager.cpp +++ b/src/wallet/wallets_manager.cpp @@ -796,16 +796,21 @@ std::string wallets_manager::get_recent_transfers(size_t wallet_id, uint64_t off return API_RETURN_CODE_CORE_BUSY; } + w->get()->get_unconfirmed_transfers(tr_hist.unconfirmed); w->get()->get_recent_transfers_history(tr_hist.history, offset, count, tr_hist.total_history_items); + + auto fix_tx = [](tools::wallet_public::wallet_transfer_info& wti) -> void { + wti.show_sender = currency::is_showing_sender_addres(wti.tx); + if (!wti.fee && !currency::is_coinbase(wti.tx)) + wti.fee = currency::get_tx_fee(wti.tx); + }; + //workaround for missed fee + for (auto & he : tr_hist.unconfirmed) + fix_tx(he); + for (auto & he : tr_hist.history) - { - he.show_sender = currency::is_showing_sender_addres(he.tx); - if (!he.fee && !currency::is_coinbase(he.tx)) - { - he.fee = currency::get_tx_fee(he.tx); - } - } + fix_tx(he); return API_RETURN_CODE_OK; }