diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-06-27 15:36:54 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-06-27 15:36:54 -0500 |
commit | 2d92fa5d696c927f1dfb0b2c0a519288c62ecb06 (patch) | |
tree | b8b90ae2bab3ef9fc88d9343708d0066ce62b4e2 /src/simplewallet | |
parent | Merge pull request #3716 (diff) | |
parent | simplewallet: don't confirm missing payment ID when sending to only subaddresses (diff) | |
download | monero-2d92fa5d696c927f1dfb0b2c0a519288c62ecb06.tar.xz |
Merge pull request #3979
362f5e6 simplewallet: don't confirm missing payment ID when sending to only subaddresses (stoffu)
Diffstat (limited to 'src/simplewallet')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 24c42a597..21b626640 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -4575,6 +4575,7 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri } vector<cryptonote::tx_destination_entry> dsts; + size_t num_subaddresses = 0; for (size_t i = 0; i < local_args.size(); i += 2) { cryptonote::address_parse_info info; @@ -4586,6 +4587,7 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri } de.addr = info.address; de.is_subaddress = info.is_subaddress; + num_subaddresses += info.is_subaddress; if (info.has_payment_id) { @@ -4618,7 +4620,7 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri } // prompt is there is no payment id and confirmation is required - if (!payment_id_seen && m_wallet->confirm_missing_payment_id()) + if (!payment_id_seen && m_wallet->confirm_missing_payment_id() && dsts.size() > num_subaddresses) { std::string accepted = input_line(tr("No payment id is included with this transaction. Is this okay? (Y/Yes/N/No): ")); if (std::cin.eof()) @@ -5071,7 +5073,7 @@ bool simple_wallet::sweep_main(uint64_t below, const std::vector<std::string> &a } // prompt is there is no payment id and confirmation is required - if (!payment_id_seen && m_wallet->confirm_missing_payment_id()) + if (!payment_id_seen && m_wallet->confirm_missing_payment_id() && !info.is_subaddress) { std::string accepted = input_line(tr("No payment id is included with this transaction. Is this okay? (Y/Yes/N/No): ")); if (std::cin.eof()) @@ -5284,7 +5286,7 @@ bool simple_wallet::sweep_single(const std::vector<std::string> &args_) } // prompt if there is no payment id and confirmation is required - if (!payment_id_seen && m_wallet->confirm_missing_payment_id()) + if (!payment_id_seen && m_wallet->confirm_missing_payment_id() && !info.is_subaddress) { std::string accepted = input_line(tr("No payment id is included with this transaction. Is this okay? (Y/Yes/N/No): ")); if (std::cin.eof()) |