You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
wow-lite-wallet/light_patch.diff

149 lines
6.0 KiB

diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 69d4652bb..efd04ca68 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -3876,23 +3876,10 @@ bool simple_wallet::ask_wallet_create_if_needed()
*/
void simple_wallet::print_seed(const epee::wipeable_string &seed)
{
- success_msg_writer(true) << "\n" << boost::format(tr("NOTE: the following %s can be used to recover access to your wallet. "
- "Write them down and store them somewhere safe and secure. Please do not store them in "
- "your email or on file storage services outside of your immediate control.\n")) % (m_wallet->multisig() ? tr("string") : tr("25 words"));
- // don't log
int space_index = 0;
size_t len = seed.size();
for (const char *ptr = seed.data(); len--; ++ptr)
{
- if (*ptr == ' ')
- {
- if (space_index == 15 || space_index == 7)
- putchar('\n');
- else
- putchar(*ptr);
- ++space_index;
- }
- else
putchar(*ptr);
}
putchar('\n');
@@ -4640,40 +4627,9 @@ bool simple_wallet::try_connect_to_daemon(bool silent, uint32_t* version)
*/
std::string simple_wallet::get_mnemonic_language()
{
- std::vector<std::string> language_list_self, language_list_english;
- const std::vector<std::string> &language_list = m_use_english_language_names ? language_list_english : language_list_self;
- std::string language_choice;
- int language_number = -1;
- crypto::ElectrumWords::get_language_list(language_list_self, false);
- crypto::ElectrumWords::get_language_list(language_list_english, true);
- std::cout << tr("List of available languages for your wallet's seed:") << std::endl;
- std::cout << tr("If your display freezes, exit blind with ^C, then run again with --use-english-language-names") << std::endl;
- int ii;
- std::vector<std::string>::const_iterator it;
- for (it = language_list.begin(), ii = 0; it != language_list.end(); it++, ii++)
- {
- std::cout << ii << " : " << *it << std::endl;
- }
- while (language_number < 0)
- {
- language_choice = input_line(tr("Enter the number corresponding to the language of your choice"));
- if (std::cin.eof())
- return std::string();
- try
- {
- language_number = std::stoi(language_choice);
- if (!((language_number >= 0) && (static_cast<unsigned int>(language_number) < language_list.size())))
- {
- language_number = -1;
- fail_msg_writer() << tr("invalid language choice entered. Please try again.\n");
- }
- }
- catch (const std::exception &e)
- {
- fail_msg_writer() << tr("invalid language choice entered. Please try again.\n");
- }
- }
- return language_list_self[language_number];
+ std::vector<std::string> language_list;
+ crypto::ElectrumWords::get_language_list(language_list, m_use_english_language_names);
+ return language_list[1];
}
//----------------------------------------------------------------------------------------------------
boost::optional<tools::password_container> simple_wallet::get_and_verify_password() const
@@ -4778,11 +4734,9 @@ boost::optional<epee::wipeable_string> simple_wallet::new_wallet(const boost::pr
"your wallet again (your wallet keys are NOT at risk in any case).\n")
;
- if (!two_random)
- {
- print_seed(electrum_words);
- }
- success_msg_writer() << "**********************************************************************";
+ success_msg_writer() << "******************************************************************SEED";
+ print_seed(electrum_words);
+ success_msg_writer() << "******************************************************************SEED";
return password;
}
@@ -6666,17 +6620,6 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri
{
prompt << tr("WARNING: this is a non default ring size, which may harm your privacy. Default is recommended.");
}
- prompt << ENDL << tr("Is this okay?");
-
- std::string accepted = input_line(prompt.str(), true);
- if (std::cin.eof())
- return false;
- if (!command_line::is_yes(accepted))
- {
- fail_msg_writer() << tr("transaction cancelled.");
-
- return false;
- }
}
// actually commit the transactions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 4779c3335..e218df7e1 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1134,7 +1134,7 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std
m_trusted_daemon(false),
m_nettype(nettype),
m_multisig_rounds_passed(0),
- m_always_confirm_transfers(true),
+ m_always_confirm_transfers(false),
m_print_ring_members(false),
m_store_tx_info(true),
m_default_mixin(0),
@@ -1145,13 +1145,13 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std
m_refresh_from_block_height(0),
m_explicit_refresh_from_block_height(true),
m_confirm_non_default_ring_size(true),
- m_ask_password(AskPasswordOnAction),
+ m_ask_password(AskPasswordNever),
m_min_output_count(0),
m_min_output_value(0),
m_merge_destinations(false),
- m_confirm_backlog(true),
+ m_confirm_backlog(false),
m_confirm_backlog_threshold(0),
- m_confirm_export_overwrite(true),
+ m_confirm_export_overwrite(false),
m_auto_low_priority(true),
m_segregate_pre_fork_outputs(false),
m_key_reuse_mitigation2(false),
@@ -4000,6 +4000,12 @@ void wallet2::change_password(const std::string &filename, const epee::wipeable_
*/
bool wallet2::load_keys(const std::string& keys_file_name, const epee::wipeable_string& password)
{
+ m_ask_password = AskPasswordNever;
+ m_always_confirm_transfers = false;
+ m_confirm_backlog = false;
+ m_confirm_export_overwrite = false;
+ m_confirm_non_default_ring_size = true;
+ m_inactivity_lock_timeout = 525600;
std::string keys_file_buf;
bool r = load_from_file(keys_file_name, keys_file_buf);
THROW_WALLET_EXCEPTION_IF(!r, error::file_read_error, keys_file_name);