aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/api')
-rw-r--r--src/wallet/api/pending_transaction.cpp5
-rw-r--r--src/wallet/api/unsigned_transaction.cpp5
-rw-r--r--src/wallet/api/utils.cpp9
-rw-r--r--src/wallet/api/wallet.cpp6
4 files changed, 17 insertions, 8 deletions
diff --git a/src/wallet/api/pending_transaction.cpp b/src/wallet/api/pending_transaction.cpp
index 760c84f4f..09010a688 100644
--- a/src/wallet/api/pending_transaction.cpp
+++ b/src/wallet/api/pending_transaction.cpp
@@ -32,9 +32,8 @@
#include "wallet.h"
#include "common_defines.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
-#include "cryptonote_core/cryptonote_basic_impl.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/cryptonote_format_utils.h"
+#include "cryptonote_basic/cryptonote_basic_impl.h"
#include <memory>
#include <vector>
diff --git a/src/wallet/api/unsigned_transaction.cpp b/src/wallet/api/unsigned_transaction.cpp
index 84ec2d9d2..b412084b0 100644
--- a/src/wallet/api/unsigned_transaction.cpp
+++ b/src/wallet/api/unsigned_transaction.cpp
@@ -32,9 +32,8 @@
#include "wallet.h"
#include "common_defines.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
-#include "cryptonote_core/cryptonote_basic_impl.h"
-#include "cryptonote_core/cryptonote_format_utils.h"
+#include "cryptonote_basic/cryptonote_format_utils.h"
+#include "cryptonote_basic/cryptonote_basic_impl.h"
#include <memory>
#include <vector>
diff --git a/src/wallet/api/utils.cpp b/src/wallet/api/utils.cpp
index 788d98f25..c369427b4 100644
--- a/src/wallet/api/utils.cpp
+++ b/src/wallet/api/utils.cpp
@@ -39,8 +39,13 @@ namespace Monero {
namespace Utils {
bool isAddressLocal(const std::string &address)
-{
- return tools::is_local_address(address);
+{
+ try {
+ return tools::is_local_address(address);
+ } catch (const std::exception &e) {
+ MERROR("error: " << e.what());
+ return false;
+ }
}
}
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 830f98909..2524107c4 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -44,6 +44,9 @@
using namespace std;
using namespace cryptonote;
+#undef MONERO_DEFAULT_LOG_CATEGORY
+#define MONERO_DEFAULT_LOG_CATEGORY "WalletAPI"
+
namespace Monero {
namespace {
@@ -255,6 +258,9 @@ uint64_t Wallet::maximumAllowedAmount()
return std::numeric_limits<uint64_t>::max();
}
+void Wallet::debug(const std::string &str) {
+ MDEBUG(str);
+}
///////////////////////// WalletImpl implementation ////////////////////////
WalletImpl::WalletImpl(bool testnet)