aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-24 08:56:52 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-24 08:58:59 +0000
commit16eda54b38217750829292ca91b8c1239f96964e (patch)
tree844ef011e8c3118f9f99dc7b63ed3ebb5f146ac6 /src
parentMerge pull request #5267 (diff)
downloadmonero-16eda54b38217750829292ca91b8c1239f96964e.tar.xz
wallet: use original user address if we have a short payment id
Diffstat (limited to 'src')
-rw-r--r--src/simplewallet/simplewallet.cpp2
-rw-r--r--src/wallet/wallet_rpc_server.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index f390b7675..95c9e5369 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -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];
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 += std::string(" (" + standard_address + " with encrypted payment id " + epee::string_tools::pod_to_hex(payment_id8) + ")");
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 7040597df..0e3fe9fc2 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -1173,7 +1173,7 @@ namespace tools
{
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);
- 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);
auto i = dests.find(entry.addr);
if (i == dests.end())