forked from lthn/blockchain
fix for #152
This commit is contained in:
parent
bda15d3153
commit
1fcaccf61b
1 changed files with 10 additions and 3 deletions
|
|
@ -556,7 +556,11 @@ void wallet2::prepare_wti_decrypted_attachments(wallet_public::wallet_transfer_i
|
|||
if (wti.remote_addresses.empty())
|
||||
{
|
||||
handle_2_alternative_types_in_variant_container<tx_receiver, tx_receiver_old>(decrypted_att, [&](const tx_receiver& p) {
|
||||
std::string addr_str = currency::get_account_address_as_str(p.acc_addr);
|
||||
std::string addr_str;
|
||||
if (wti.payment_id.empty())
|
||||
addr_str = currency::get_account_address_as_str(p.acc_addr);
|
||||
else
|
||||
addr_str = currency::get_account_address_and_payment_id_as_str(p.acc_addr, wti.payment_id); // show integrated address if there's a payment id provided
|
||||
wti.remote_addresses.push_back(addr_str);
|
||||
LOG_PRINT_YELLOW("prepare_wti_decrypted_attachments, income=false, wti.amount = " << print_money_brief(wti.amount) << ", rem. addr = " << addr_str, LOG_LEVEL_0);
|
||||
return true; // continue iterating through the container
|
||||
|
|
@ -3886,6 +3890,9 @@ void wallet2::add_sent_tx_detailed_info(const transaction& tx,
|
|||
const std::vector<currency::tx_destination_entry>& destinations,
|
||||
const std::vector<uint64_t>& selected_transfers)
|
||||
{
|
||||
payment_id_t payment_id;
|
||||
get_payment_id_from_tx(tx.attachment, payment_id);
|
||||
|
||||
std::vector<std::string> recipients;
|
||||
std::unordered_set<account_public_address> used_addresses;
|
||||
for (const auto& d : destinations)
|
||||
|
|
@ -3893,13 +3900,13 @@ void wallet2::add_sent_tx_detailed_info(const transaction& tx,
|
|||
for (const auto& addr : d.addr)
|
||||
{
|
||||
if (used_addresses.insert(addr).second && addr != m_account.get_public_address())
|
||||
recipients.push_back(get_account_address_as_str(addr));
|
||||
recipients.push_back(payment_id.empty() ? get_account_address_as_str(addr) : get_account_address_and_payment_id_as_str(addr, payment_id));
|
||||
}
|
||||
}
|
||||
if (!recipients.size())
|
||||
{
|
||||
//transaction send to ourself
|
||||
recipients.push_back(get_account_address_as_str(m_account.get_public_address()));
|
||||
recipients.push_back(payment_id.empty() ? get_account_address_as_str(m_account.get_public_address()) : get_account_address_and_payment_id_as_str(m_account.get_public_address(), payment_id));
|
||||
}
|
||||
|
||||
add_sent_unconfirmed_tx(tx, recipients, selected_transfers, destinations);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue