From 2473df2275e5c8c23140ef08b17246d07dfae79d Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Mon, 12 Feb 2024 23:01:12 +0400 Subject: [PATCH] assets: thirdparty assets not erasing from own list --- src/wallet/wallet2.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 578e3ec1..305a3a57 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -474,7 +474,7 @@ void wallet2::process_ado_in_new_transaction(const currency::asset_descriptor_op else { //update event for asset that we control, check if ownership is still ours - if (ado.descriptor.owner != m_account.get_public_address().spend_public_key) + if (ado.descriptor.owner != m_account.get_public_address().spend_public_key && !it->second.thirdparty_custody) { //ownership of the asset had been transfered add_rollback_event(ptc.height, asset_unown_event{ it->first, it->second }); @@ -494,15 +494,12 @@ void wallet2::process_ado_in_new_transaction(const currency::asset_descriptor_op WLT_LOG_MAGENTA(ss.str(), LOG_LEVEL_0); if (m_wcallback) m_wcallback->on_message(i_wallet2_callback::ms_yellow, ss.str()); - - } else { //just an update of the asset add_rollback_event(ptc.height, asset_update_event{ it->first, it->second }); it->second.asset_descriptor = ado.descriptor; - } } }