From be1c01298ab4e2d850ac18537784d1c11c777c60 Mon Sep 17 00:00:00 2001 From: stoffu Date: Mon, 20 Nov 2017 18:10:58 +0900 Subject: fix for tx proof: use exception instead of error_str when signature gen failed --- src/simplewallet/simplewallet.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/simplewallet/simplewallet.cpp') diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index d971f4fed..ebcfea1a9 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -3964,20 +3964,12 @@ bool simple_wallet::get_tx_proof(const std::vector &args) try { - std::string error_str; - std::string sig_str = m_wallet->get_tx_proof(txid, info.address, info.is_subaddress, args.size() == 3 ? args[2] : "", error_str); - if (sig_str.empty()) - { - fail_msg_writer() << error_str; - } + 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"; + if (epee::file_io_utils::save_string_to_file(filename, sig_str)) + success_msg_writer() << tr("signature file saved to: ") << filename; else - { - const std::string filename = "monero_tx_proof"; - if (epee::file_io_utils::save_string_to_file(filename, sig_str)) - success_msg_writer() << tr("signature file saved to:") << filename; - else - fail_msg_writer() << tr("failed to save signature file"); - } + fail_msg_writer() << tr("failed to save signature file"); } catch (const std::exception &e) { -- cgit v1.2.3