change file names

pull/88/head
wowario 6 years ago
parent 6d24a6f94b
commit db83f0a62d
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

@ -1267,7 +1267,7 @@ bool simple_wallet::export_raw_multisig(const std::vector<std::string> &args)
for (auto &ptx: txs.m_ptx) for (auto &ptx: txs.m_ptx)
{ {
const crypto::hash txid = cryptonote::get_transaction_hash(ptx.tx); const crypto::hash txid = cryptonote::get_transaction_hash(ptx.tx);
const std::string filename = std::string("raw_multisig_monero_tx_") + epee::string_tools::pod_to_hex(txid); const std::string filename = std::string("raw_multisig_wownero_tx_") + epee::string_tools::pod_to_hex(txid);
if (!filenames.empty()) if (!filenames.empty())
filenames += ", "; filenames += ", ";
filenames += filename; filenames += filename;
@ -4658,26 +4658,26 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri
// actually commit the transactions // actually commit the transactions
if (m_wallet->multisig()) if (m_wallet->multisig())
{ {
bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_monero_tx"); bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_wownero_tx");
if (!r) if (!r)
{ {
fail_msg_writer() << tr("Failed to write transaction(s) to file"); fail_msg_writer() << tr("Failed to write transaction(s) to file");
} }
else else
{ {
success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_monero_tx"; success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_wownero_tx";
} }
} }
else if (m_wallet->watch_only()) else if (m_wallet->watch_only())
{ {
bool r = m_wallet->save_tx(ptx_vector, "unsigned_monero_tx"); bool r = m_wallet->save_tx(ptx_vector, "unsigned_wownero_tx");
if (!r) if (!r)
{ {
fail_msg_writer() << tr("Failed to write transaction(s) to file"); fail_msg_writer() << tr("Failed to write transaction(s) to file");
} }
else else
{ {
success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_monero_tx"; success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_wownero_tx";
} }
} }
else else
@ -4766,26 +4766,26 @@ bool simple_wallet::sweep_unmixable(const std::vector<std::string> &args_)
// actually commit the transactions // actually commit the transactions
if (m_wallet->multisig()) if (m_wallet->multisig())
{ {
bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_monero_tx"); bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_wownero_tx");
if (!r) if (!r)
{ {
fail_msg_writer() << tr("Failed to write transaction(s) to file"); fail_msg_writer() << tr("Failed to write transaction(s) to file");
} }
else else
{ {
success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_monero_tx"; success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_wownero_tx";
} }
} }
else if (m_wallet->watch_only()) else if (m_wallet->watch_only())
{ {
bool r = m_wallet->save_tx(ptx_vector, "unsigned_monero_tx"); bool r = m_wallet->save_tx(ptx_vector, "unsigned_wownero_tx");
if (!r) if (!r)
{ {
fail_msg_writer() << tr("Failed to write transaction(s) to file"); fail_msg_writer() << tr("Failed to write transaction(s) to file");
} }
else else
{ {
success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_monero_tx"; success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_wownero_tx";
} }
} }
else else
@ -5013,26 +5013,26 @@ bool simple_wallet::sweep_main(uint64_t below, const std::vector<std::string> &a
// actually commit the transactions // actually commit the transactions
if (m_wallet->multisig()) if (m_wallet->multisig())
{ {
bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_monero_tx"); bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_wownero_tx");
if (!r) if (!r)
{ {
fail_msg_writer() << tr("Failed to write transaction(s) to file"); fail_msg_writer() << tr("Failed to write transaction(s) to file");
} }
else else
{ {
success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_monero_tx"; success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_wownero_tx";
} }
} }
else if (m_wallet->watch_only()) else if (m_wallet->watch_only())
{ {
bool r = m_wallet->save_tx(ptx_vector, "unsigned_monero_tx"); bool r = m_wallet->save_tx(ptx_vector, "unsigned_wownero_tx");
if (!r) if (!r)
{ {
fail_msg_writer() << tr("Failed to write transaction(s) to file"); fail_msg_writer() << tr("Failed to write transaction(s) to file");
} }
else else
{ {
success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_monero_tx"; success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_wownero_tx";
} }
} }
else else
@ -5210,26 +5210,26 @@ bool simple_wallet::sweep_single(const std::vector<std::string> &args_)
// actually commit the transactions // actually commit the transactions
if (m_wallet->multisig()) if (m_wallet->multisig())
{ {
bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_monero_tx"); bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_wownero_tx");
if (!r) if (!r)
{ {
fail_msg_writer() << tr("Failed to write transaction(s) to file"); fail_msg_writer() << tr("Failed to write transaction(s) to file");
} }
else else
{ {
success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_monero_tx"; success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_wownero_tx";
} }
} }
else if (m_wallet->watch_only()) else if (m_wallet->watch_only())
{ {
bool r = m_wallet->save_tx(ptx_vector, "unsigned_monero_tx"); bool r = m_wallet->save_tx(ptx_vector, "unsigned_wownero_tx");
if (!r) if (!r)
{ {
fail_msg_writer() << tr("Failed to write transaction(s) to file"); fail_msg_writer() << tr("Failed to write transaction(s) to file");
} }
else else
{ {
success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_monero_tx"; success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_wownero_tx";
} }
} }
else else
@ -5487,7 +5487,7 @@ bool simple_wallet::sign_transfer(const std::vector<std::string> &args_)
std::vector<tools::wallet2::pending_tx> ptx; std::vector<tools::wallet2::pending_tx> ptx;
try try
{ {
bool r = m_wallet->sign_tx("unsigned_monero_tx", "signed_monero_tx", ptx, [&](const tools::wallet2::unsigned_tx_set &tx){ return accept_loaded_tx(tx); }, export_raw); bool r = m_wallet->sign_tx("unsigned_wownero_tx", "signed_wownero_tx", ptx, [&](const tools::wallet2::unsigned_tx_set &tx){ return accept_loaded_tx(tx); }, export_raw);
if (!r) if (!r)
{ {
fail_msg_writer() << tr("Failed to sign transaction"); fail_msg_writer() << tr("Failed to sign transaction");
@ -5507,7 +5507,7 @@ bool simple_wallet::sign_transfer(const std::vector<std::string> &args_)
txids_as_text += (", "); txids_as_text += (", ");
txids_as_text += epee::string_tools::pod_to_hex(get_transaction_hash(t.tx)); txids_as_text += epee::string_tools::pod_to_hex(get_transaction_hash(t.tx));
} }
success_msg_writer(true) << tr("Transaction successfully signed to file ") << "signed_monero_tx" << ", txid " << txids_as_text; success_msg_writer(true) << tr("Transaction successfully signed to file ") << "signed_wownero_tx" << ", txid " << txids_as_text;
if (export_raw) if (export_raw)
{ {
std::string rawfiles_as_text; std::string rawfiles_as_text;
@ -5515,7 +5515,7 @@ bool simple_wallet::sign_transfer(const std::vector<std::string> &args_)
{ {
if (i > 0) if (i > 0)
rawfiles_as_text += ", "; rawfiles_as_text += ", ";
rawfiles_as_text += "signed_monero_tx_raw" + (ptx.size() == 1 ? "" : ("_" + std::to_string(i))); rawfiles_as_text += "signed_wownero_tx_raw" + (ptx.size() == 1 ? "" : ("_" + std::to_string(i)));
} }
success_msg_writer(true) << tr("Transaction raw hex data exported to ") << rawfiles_as_text; success_msg_writer(true) << tr("Transaction raw hex data exported to ") << rawfiles_as_text;
} }
@ -5535,7 +5535,7 @@ bool simple_wallet::submit_transfer(const std::vector<std::string> &args_)
try try
{ {
std::vector<tools::wallet2::pending_tx> ptx_vector; std::vector<tools::wallet2::pending_tx> ptx_vector;
bool r = m_wallet->load_tx("signed_monero_tx", ptx_vector, [&](const tools::wallet2::signed_tx_set &tx){ return accept_loaded_tx(tx); }); bool r = m_wallet->load_tx("signed_wownero_tx", ptx_vector, [&](const tools::wallet2::signed_tx_set &tx){ return accept_loaded_tx(tx); });
if (!r) if (!r)
{ {
fail_msg_writer() << tr("Failed to load transaction from file"); fail_msg_writer() << tr("Failed to load transaction from file");
@ -5631,7 +5631,7 @@ bool simple_wallet::get_tx_proof(const std::vector<std::string> &args)
try try
{ {
std::string sig_str = m_wallet->get_tx_proof(txid, info.address, info.is_subaddress, args.size() == 3 ? args[2] : ""); std::string sig_str = m_wallet->get_tx_proof(txid, info.address, info.is_subaddress, args.size() == 3 ? args[2] : "");
const std::string filename = "monero_tx_proof"; const std::string filename = "wownero_tx_proof";
if (epee::file_io_utils::save_string_to_file(filename, sig_str)) if (epee::file_io_utils::save_string_to_file(filename, sig_str))
success_msg_writer() << tr("signature file saved to: ") << filename; success_msg_writer() << tr("signature file saved to: ") << filename;
else else
@ -5846,7 +5846,7 @@ bool simple_wallet::get_spend_proof(const std::vector<std::string> &args)
try try
{ {
const std::string sig_str = m_wallet->get_spend_proof(txid, args.size() == 2 ? args[1] : ""); const std::string sig_str = m_wallet->get_spend_proof(txid, args.size() == 2 ? args[1] : "");
const std::string filename = "monero_spend_proof"; const std::string filename = "wownero_spend_proof";
if (epee::file_io_utils::save_string_to_file(filename, sig_str)) if (epee::file_io_utils::save_string_to_file(filename, sig_str))
success_msg_writer() << tr("signature file saved to: ") << filename; success_msg_writer() << tr("signature file saved to: ") << filename;
else else
@ -5943,7 +5943,7 @@ bool simple_wallet::get_reserve_proof(const std::vector<std::string> &args)
try try
{ {
const std::string sig_str = m_wallet->get_reserve_proof(account_minreserve, args.size() == 2 ? args[1] : ""); const std::string sig_str = m_wallet->get_reserve_proof(account_minreserve, args.size() == 2 ? args[1] : "");
const std::string filename = "monero_reserve_proof"; const std::string filename = "wownero_reserve_proof";
if (epee::file_io_utils::save_string_to_file(filename, sig_str)) if (epee::file_io_utils::save_string_to_file(filename, sig_str))
success_msg_writer() << tr("signature file saved to: ") << filename; success_msg_writer() << tr("signature file saved to: ") << filename;
else else
@ -7477,7 +7477,7 @@ void simple_wallet::commit_or_save(std::vector<tools::wallet2::pending_tx>& ptx_
cryptonote::blobdata blob; cryptonote::blobdata blob;
tx_to_blob(ptx.tx, blob); tx_to_blob(ptx.tx, blob);
const std::string blob_hex = epee::string_tools::buff_to_hex_nodelimer(blob); const std::string blob_hex = epee::string_tools::buff_to_hex_nodelimer(blob);
const std::string filename = "raw_monero_tx" + (ptx_vector.size() == 1 ? "" : ("_" + std::to_string(i++))); const std::string filename = "raw_wownero_tx" + (ptx_vector.size() == 1 ? "" : ("_" + std::to_string(i++)));
if (epee::file_io_utils::save_string_to_file(filename, blob_hex)) if (epee::file_io_utils::save_string_to_file(filename, blob_hex))
success_msg_writer(true) << tr("Transaction successfully saved to ") << filename << tr(", txid ") << txid; success_msg_writer(true) << tr("Transaction successfully saved to ") << filename << tr(", txid ") << txid;
else else

Loading…
Cancel
Save