aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-01-10 11:49:14 +0100
committerRiccardo Spagni <ric@spagni.net>2018-01-10 11:49:14 +0100
commitbfe580787d964ccc9b041c76064b12c445c1c547 (patch)
tree674f9d00fc567ebae3ed6f78850487957d8b5c9d
parentMerge pull request #2973 (diff)
parentsimplewallet: disable donations on testnet (diff)
downloadmonero-bfe580787d964ccc9b041c76064b12c445c1c547.tar.xz
Merge pull request #2976
c765f951 simplewallet: disable donations on testnet (Matt Smith)
-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 db5e44461..b0fd1fa75 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -4528,6 +4528,12 @@ bool simple_wallet::sweep_below(const std::vector<std::string> &args_)
//----------------------------------------------------------------------------------------------------
bool simple_wallet::donate(const std::vector<std::string> &args_)
{
+ if(m_wallet->testnet())
+ {
+ fail_msg_writer() << tr("donations are not enabled on the testnet");
+ return true;
+ }
+
std::vector<std::string> local_args = args_;
if(local_args.empty() || local_args.size() > 5)
{