aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-08-18 14:29:34 +0200
committerJaquee <jaquee.monero@gmail.com>2017-08-21 08:11:12 +0200
commitd58700e003ab3126fd21cb6df0a9a27365f5fc02 (patch)
tree3ba96cc894c0e774fd680a39b843c686c32f265a
parentWalletAPI: copy wallet data when creating a view only wallet (diff)
downloadmonero-d58700e003ab3126fd21cb6df0a9a27365f5fc02.tar.xz
WalletAPI: only allow trusted daemon when importing key images
-rw-r--r--src/wallet/api/wallet.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 06e9019cf..7afc1f449 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -889,6 +889,11 @@ bool WalletImpl::exportKeyImages(const string &filename)
bool WalletImpl::importKeyImages(const string &filename)
{
+ if (!trustedDaemon()) {
+ m_status = Status_Error;
+ m_errorString = tr("Key images can only be imported with a trusted daemon");
+ return false;
+ }
try
{
uint64_t spent = 0, unspent = 0;