diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 20745cdf..f7078763 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3754,13 +3754,10 @@ bool wallet2::balance(std::unordered_mapsecond)) // if is_incoming == false, then we need to check for change and add it to total + if (it_employed_entry == subtransfers_by_assets_map.end() || !(it_employed_entry->second)) // if is_incoming == false, then we need to check for change and add it to total { + //it_employed_entry == subtransfers_by_assets_map.end() is a case when amount sent exactly equal amount received (someone producing more outputs for example) + //still need to add to total as it is a change wallet_public::asset_balance_entry_base& e = balances[emp_entry.asset_id]; e.total += emp_entry.amount; } diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 1a372db9..069e6856 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -1433,7 +1433,7 @@ namespace tools res.status = e.what(); return true; } - res.status = API_RETURN_CODE_OK; + res.status = API_RETURN_CODE_OK; return true; WALLET_RPC_CATCH_TRY_ENTRY(); }