aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2017-11-20 18:10:58 +0900
committerstoffu <stoffu@protonmail.ch>2017-11-21 16:48:22 +0900
commitbe1c01298ab4e2d850ac18537784d1c11c777c60 (patch)
tree8babed79a324b782b46db831292217e01213bc44 /src/simplewallet
parentMerge pull request #2783 (diff)
downloadmonero-be1c01298ab4e2d850ac18537784d1c11c777c60.tar.xz
fix for tx proof: use exception instead of error_str when signature gen failed
Diffstat (limited to 'src/simplewallet')
-rw-r--r--src/simplewallet/simplewallet.cpp18
1 files changed, 5 insertions, 13 deletions
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<std::string> &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)
{