Fixed missing outgoing transactions from history

This commit is contained in:
cryptozoidberg 2023-06-22 23:32:17 +02:00
parent 937dfe042e
commit 1183c8b548
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
2 changed files with 9 additions and 9 deletions

View file

@ -3810,16 +3810,10 @@ bool enum_container(iterator_t it_begin, iterator_t it_end, callback_t cb)
//----------------------------------------------------------------------------------------------------
bool wallet2::is_defragmentation_transaction(const wallet_public::wallet_transfer_info& wti)
{
if (wti.employed_entries.receive.size() && wti.employed_entries.spent.size())
if (wti.employed_entries.receive.size() && wti.employed_entries.spent.size() && wti.subtransfers.size() == 1)
{
for (const auto& st : wti.subtransfers)
{
if (st.asset_id == currency::native_coin_asset_id)
{
if (!st.is_income && st.amount == get_tx_fee(wti.tx))
return true;
}
}
if (wti.subtransfers[0].asset_id == currency::native_coin_asset_id && !wti.subtransfers[0].is_income && wti.subtransfers[0].amount == get_tx_fee(wti.tx))
return true;
}
return false;
}

View file

@ -28,6 +28,12 @@ using namespace epee;
er.message = e.what(); \
return false; \
} \
catch (const tools::error::not_enough_money& e) \
{ \
er.code = WALLET_RPC_ERROR_CODE_GENERIC_TRANSFER_ERROR; \
er.message = e.error_code(); \
return false; \
} \
catch (const tools::error::wallet_error& e) \
{ \
er.code = WALLET_RPC_ERROR_CODE_GENERIC_TRANSFER_ERROR; \