mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #5018
8bd71677
simplewallet: remove ability to transfer with detached short payment ids (moneromooo-monero)
This commit is contained in:
commit
46fcae717a
1 changed files with 2 additions and 31 deletions
|
@ -5319,19 +5319,6 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri
|
||||||
payment_id_seen = true;
|
payment_id_seen = true;
|
||||||
message_writer() << tr("Unencrypted payment IDs are bad for privacy: ask the recipient to use subaddresses instead");
|
message_writer() << tr("Unencrypted payment IDs are bad for privacy: ask the recipient to use subaddresses instead");
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
crypto::hash8 payment_id8;
|
|
||||||
if (tools::wallet2::parse_short_payment_id(payment_id_str, payment_id8))
|
|
||||||
{
|
|
||||||
std::string extra_nonce;
|
|
||||||
set_encrypted_payment_id_to_tx_extra_nonce(extra_nonce, payment_id8);
|
|
||||||
r = add_extra_nonce_to_tx_extra(extra, extra_nonce);
|
|
||||||
local_args.pop_back();
|
|
||||||
payment_id_seen = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!r)
|
if(!r)
|
||||||
{
|
{
|
||||||
fail_msg_writer() << tr("payment id failed to encode");
|
fail_msg_writer() << tr("payment id failed to encode");
|
||||||
|
@ -5984,18 +5971,6 @@ bool simple_wallet::sweep_main(uint64_t below, bool locked, const std::vector<st
|
||||||
r = add_extra_nonce_to_tx_extra(extra, extra_nonce);
|
r = add_extra_nonce_to_tx_extra(extra, extra_nonce);
|
||||||
payment_id_seen = true;
|
payment_id_seen = true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
crypto::hash8 payment_id8;
|
|
||||||
r = tools::wallet2::parse_short_payment_id(payment_id_str, payment_id8);
|
|
||||||
if(r)
|
|
||||||
{
|
|
||||||
std::string extra_nonce;
|
|
||||||
set_encrypted_payment_id_to_tx_extra_nonce(extra_nonce, payment_id8);
|
|
||||||
r = add_extra_nonce_to_tx_extra(extra, extra_nonce);
|
|
||||||
payment_id_seen = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!r && local_args.size() == 3)
|
if(!r && local_args.size() == 3)
|
||||||
{
|
{
|
||||||
|
@ -6248,10 +6223,6 @@ bool simple_wallet::sweep_single(const std::vector<std::string> &args_)
|
||||||
{
|
{
|
||||||
set_payment_id_to_tx_extra_nonce(extra_nonce, payment_id);
|
set_payment_id_to_tx_extra_nonce(extra_nonce, payment_id);
|
||||||
}
|
}
|
||||||
else if(tools::wallet2::parse_short_payment_id(local_args.back(), payment_id8))
|
|
||||||
{
|
|
||||||
set_encrypted_payment_id_to_tx_extra_nonce(extra_nonce, payment_id8);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fail_msg_writer() << tr("failed to parse Payment ID");
|
fail_msg_writer() << tr("failed to parse Payment ID");
|
||||||
|
@ -8255,8 +8226,8 @@ bool simple_wallet::address_book(const std::vector<std::string> &args/* = std::v
|
||||||
}
|
}
|
||||||
else if (tools::wallet2::parse_short_payment_id(args[3], info.payment_id))
|
else if (tools::wallet2::parse_short_payment_id(args[3], info.payment_id))
|
||||||
{
|
{
|
||||||
memcpy(payment_id.data, info.payment_id.data, 8);
|
fail_msg_writer() << tr("Short payment IDs are to be used within an integrated address only");
|
||||||
description_start += 2;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue