diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 47d7f01d..279bfc36 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1184,12 +1184,12 @@ void wallet2::prepare_wti(wallet_public::wallet_transfer_info& wti, uint64_t hei decrypt_payload_items(decrypt_attachment_as_income, tx, m_account.get_keys(), decrypted_att); - if (is_watch_only() || (height > 638000 && !has_field_of_type_in_extra(decrypted_att))) + if ((is_watch_only() && !wti.is_income)|| (height > 638000 && !has_field_of_type_in_extra(decrypted_att))) { remove_field_of_type_from_extra(decrypted_att); remove_field_of_type_from_extra(decrypted_att); } - if (is_watch_only()) + if (is_watch_only() && !wti.is_income) { remove_field_of_type_from_extra(decrypted_att); } @@ -4221,8 +4221,8 @@ bool wallet2::extract_offers_from_transfer_entry(size_t i, std::unordered_map& selected_in WLT_LOG_GREEN("Selecting indices for transfer of " << print_money_brief(needed_money) << " with " << fake_outputs_count << " fake outs, found_free_amounts.size()=" << found_free_amounts.size() << "...", LOG_LEVEL_0); uint64_t found_money = 0; std::string selected_amounts_str; - while(found_money < needed_money && found_free_amounts.size()) + while (found_money < needed_money && found_free_amounts.size()) { auto it = found_free_amounts.lower_bound(needed_money - found_money); if (!(it != found_free_amounts.end() && it->second.size())) @@ -4319,6 +4319,10 @@ void wallet2::wipeout_extra_if_needed(std::vectorheight > 638000) { it->remote_addresses.clear(); + if (is_watch_only() && !it->is_income) + { + it->comment.clear(); + } } } WLT_LOG_L0("Processing [wipeout_extra_if_needed] DONE");