From 86144f44e8385b00427c6f9873b665b2c6f7b8ba Mon Sep 17 00:00:00 2001 From: SNeedlewoods Date: Mon, 13 Jan 2025 15:26:37 +0100 Subject: [PATCH] add do_not_relay option to sweep_single/submit_multisig_main commands in simplewallet --- src/simplewallet/simplewallet.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 28048590b..b5e3fa563 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -1632,13 +1632,8 @@ bool simple_wallet::submit_multisig_main(const std::vector &args, b return false; } - // actually commit the transactions - for (auto &ptx: txs.m_ptx) - { - m_wallet->commit_tx(ptx); - success_msg_writer(true) << tr("Transaction successfully submitted, transaction ") << get_transaction_hash(ptx.tx) << ENDL - << tr("You can check its status by using the `show_transfers` command."); - } + // actually commit or save the transactions + commit_or_save(txs.m_ptx, m_do_not_relay); } catch (const std::exception &e) { @@ -7436,7 +7431,6 @@ bool simple_wallet::sweep_single(const std::vector &args_) } commit_or_save(signed_tx.ptx, m_do_not_relay); - success_msg_writer(true) << tr("Money successfully sent, transaction: ") << get_transaction_hash(ptx_vector[0].tx); } catch (const std::exception& e) { @@ -7462,8 +7456,7 @@ bool simple_wallet::sweep_single(const std::vector &args_) } else { - m_wallet->commit_tx(ptx_vector[0]); - success_msg_writer(true) << tr("Money successfully sent, transaction: ") << get_transaction_hash(ptx_vector[0].tx); + commit_or_save(ptx_vector, m_do_not_relay); } }