aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-03-18 11:43:13 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-03-18 11:44:31 +0000
commit1a666c301634ebf543fe23aa1dd51388e3f05edc (patch)
treefa8cff2feff8e1aa1c2e8bbe65e0d82b65432aa8 /src
parentMerge pull request #1869 (diff)
downloadmonero-1a666c301634ebf543fe23aa1dd51388e3f05edc.tar.xz
simplewallet: catch case where no transactions are made
This would otherwise be a silent noop, which is confusing. This can happen if the daemon is started, but not yet ready to service all requests, and this is a safe catch all.
Diffstat (limited to 'src')
-rw-r--r--src/simplewallet/simplewallet.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index f5763648f..387c44545 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -2298,6 +2298,12 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri
break;
}
+ if (ptx_vector.empty())
+ {
+ fail_msg_writer() << tr("No outputs found, or daemon is not ready");
+ return true;
+ }
+
// if more than one tx necessary, prompt user to confirm
if (m_wallet->always_confirm_transfers() || ptx_vector.size() > 1)
{
@@ -2764,7 +2770,7 @@ bool simple_wallet::sweep_all(const std::vector<std::string> &args_)
if (ptx_vector.empty())
{
- fail_msg_writer() << tr("No outputs found");
+ fail_msg_writer() << tr("No outputs found, or daemon is not ready");
return true;
}