mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 10:37:37 -07:00
wallet: use original user address if we have a short payment id
This commit is contained in:
parent
cd776b1933
commit
16eda54b38
@ -6569,7 +6569,7 @@ bool simple_wallet::accept_loaded_tx(const std::function<size_t()> get_num_txes,
|
|||||||
{
|
{
|
||||||
const tx_destination_entry &entry = cd.splitted_dsts[d];
|
const tx_destination_entry &entry = cd.splitted_dsts[d];
|
||||||
std::string address, standard_address = get_account_address_as_str(m_wallet->nettype(), entry.is_subaddress, entry.addr);
|
std::string address, standard_address = get_account_address_as_str(m_wallet->nettype(), entry.is_subaddress, entry.addr);
|
||||||
if (has_encrypted_payment_id && !entry.is_subaddress)
|
if (has_encrypted_payment_id && !entry.is_subaddress && standard_address != entry.original)
|
||||||
{
|
{
|
||||||
address = get_account_integrated_address_as_str(m_wallet->nettype(), entry.addr, payment_id8);
|
address = get_account_integrated_address_as_str(m_wallet->nettype(), entry.addr, payment_id8);
|
||||||
address += std::string(" (" + standard_address + " with encrypted payment id " + epee::string_tools::pod_to_hex(payment_id8) + ")");
|
address += std::string(" (" + standard_address + " with encrypted payment id " + epee::string_tools::pod_to_hex(payment_id8) + ")");
|
||||||
|
@ -1173,7 +1173,7 @@ namespace tools
|
|||||||
{
|
{
|
||||||
const cryptonote::tx_destination_entry &entry = cd.splitted_dsts[d];
|
const cryptonote::tx_destination_entry &entry = cd.splitted_dsts[d];
|
||||||
std::string address = cryptonote::get_account_address_as_str(m_wallet->nettype(), entry.is_subaddress, entry.addr);
|
std::string address = cryptonote::get_account_address_as_str(m_wallet->nettype(), entry.is_subaddress, entry.addr);
|
||||||
if (has_encrypted_payment_id && !entry.is_subaddress)
|
if (has_encrypted_payment_id && !entry.is_subaddress && address != entry.original)
|
||||||
address = cryptonote::get_account_integrated_address_as_str(m_wallet->nettype(), entry.addr, payment_id8);
|
address = cryptonote::get_account_integrated_address_as_str(m_wallet->nettype(), entry.addr, payment_id8);
|
||||||
auto i = dests.find(entry.addr);
|
auto i = dests.find(entry.addr);
|
||||||
if (i == dests.end())
|
if (i == dests.end())
|
||||||
|
Loading…
Reference in New Issue
Block a user