From 9bfe0b9b6c601f732c4708ba00dc2203c383566f Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Mon, 16 Jun 2014 15:16:54 -0400 Subject: [PATCH] Added confirmation prompt if transactions are to be split --- src/simplewallet/simplewallet.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 96f209ca..69aade89 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -880,6 +880,22 @@ void simple_wallet::create_transactions(std::vector 1) + { + std::string prompt_str = "Your transaction needs to be split into "; + prompt_str += attempt_count; + prompt_str += " transactions. This will result in a fee of "; + prompt_str += print_money(attempt_count * DEFAULT_FEE); + prompt_str += ". Is this okay? (Y/Yes/N/No)"; + std::string accepted = command_line::input_line(prompt_str); + if (accepted != "Y" && accepted != "y" && accepted != "Yes" && accepted != "yes") + { + fail_msg_writer() << "Transaction cancelled."; + return; + } + } + // if we made it this far, we're OK to actually send the transactions while (!ptx_vector.empty()) {