aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-11 00:54:30 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-11 00:54:30 +0200
commitcb54eeaa31101dbb330cf71a4f2f917815bb653e (patch)
tree842aee18139ebc968c321baee944d1ae609ab0ea
parentMerge pull request #1696 (diff)
parentsimplewallet: print error when address is wrong (diff)
downloadmonero-cb54eeaa31101dbb330cf71a4f2f917815bb653e.tar.xz
Merge pull request #1698
9459f331 simplewallet: print error when address is wrong (kenshi84)
-rw-r--r--src/simplewallet/simplewallet.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 71a03d208..41665e4d8 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -2175,7 +2175,10 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri
bool has_payment_id;
crypto::hash8 new_payment_id;
if (!cryptonote::get_account_address_from_str_or_url(de.addr, has_payment_id, new_payment_id, m_wallet->testnet(), local_args[i]))
+ {
+ fail_msg_writer() << tr("failed to parse address");
return true;
+ }
if (has_payment_id)
{
@@ -2670,7 +2673,10 @@ bool simple_wallet::sweep_all(const std::vector<std::string> &args_)
crypto::hash8 new_payment_id;
cryptonote::account_public_address address;
if (!cryptonote::get_account_address_from_str_or_url(address, has_payment_id, new_payment_id, m_wallet->testnet(), local_args[0]))
+ {
+ fail_msg_writer() << tr("failed to parse address");
return true;
+ }
if (has_payment_id)
{