aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/api')
-rw-r--r--src/wallet/api/transaction_history.cpp3
-rw-r--r--src/wallet/api/utils.cpp2
-rw-r--r--src/wallet/api/wallet.cpp11
3 files changed, 14 insertions, 2 deletions
diff --git a/src/wallet/api/transaction_history.cpp b/src/wallet/api/transaction_history.cpp
index 63c4ea3cc..603739598 100644
--- a/src/wallet/api/transaction_history.cpp
+++ b/src/wallet/api/transaction_history.cpp
@@ -55,7 +55,8 @@ TransactionHistoryImpl::TransactionHistoryImpl(WalletImpl *wallet)
TransactionHistoryImpl::~TransactionHistoryImpl()
{
-
+ for (auto t : m_history)
+ delete t;
}
int TransactionHistoryImpl::count() const
diff --git a/src/wallet/api/utils.cpp b/src/wallet/api/utils.cpp
index 1bf35197c..7de9d1927 100644
--- a/src/wallet/api/utils.cpp
+++ b/src/wallet/api/utils.cpp
@@ -61,7 +61,7 @@ bool isAddressLocal(const std::string &address)
// resolve to IP
boost::asio::io_service io_service;
boost::asio::ip::tcp::resolver resolver(io_service);
- boost::asio::ip::tcp::resolver::query query(u_c.host, "");
+ boost::asio::ip::tcp::resolver::query query(u_c.host, "", boost::asio::ip::tcp::resolver::query::canonical_name);
boost::asio::ip::tcp::resolver::iterator i = resolver.resolve(query);
while (i != boost::asio::ip::tcp::resolver::iterator())
{
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index d21d8b900..215b61aef 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -605,6 +605,17 @@ PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, const
break;
}
}
+ else if (has_payment_id) {
+ std::string extra_nonce;
+ set_encrypted_payment_id_to_tx_extra_nonce(extra_nonce, payment_id_short);
+ bool r = add_extra_nonce_to_tx_extra(extra, extra_nonce);
+ if (!r) {
+ m_status = Status_Error;
+ m_errorString = tr("Failed to add short payment id: ") + epee::string_tools::pod_to_hex(payment_id_short);
+ break;
+ }
+ }
+
//std::vector<tools::wallet2::pending_tx> ptx_vector;