aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/api/wallet.cpp')
-rw-r--r--src/wallet/api/wallet.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 354e27ac6..be379cb99 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -36,7 +36,6 @@
#include "mnemonics/electrum-words.h"
#include <boost/format.hpp>
-#include <boost/regex.hpp>
#include <sstream>
using namespace std;
@@ -146,7 +145,6 @@ std::string Wallet::genPaymentId()
}
-
///////////////////////// WalletImpl implementation ////////////////////////
WalletImpl::WalletImpl(bool testnet)
:m_wallet(nullptr), m_status(Wallet::Status_Ok), m_trustedDaemon(false),
@@ -397,11 +395,13 @@ bool WalletImpl::refresh()
// - payment_details;
// - unconfirmed_transfer_details;
// - confirmed_transfer_details)
+
PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, const string &payment_id, uint64_t amount, uint32_t mixin_count)
{
clearStatus();
vector<cryptonote::tx_destination_entry> dsts;
cryptonote::tx_destination_entry de;
+
// indicates if dst_addr is integrated address (address + payment_id)
bool has_payment_id;
crypto::hash8 payment_id_short;
@@ -420,6 +420,7 @@ PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, const
break;
}
+
std::vector<uint8_t> extra;
// if dst_addr is not an integrated address, parse payment_id
if (!has_payment_id && !payment_id.empty()) {
@@ -446,7 +447,6 @@ PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, const
}
}
-
de.amount = amount;
if (de.amount <= 0) {
m_status = Status_Error;
@@ -457,8 +457,6 @@ PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, const
dsts.push_back(de);
//std::vector<tools::wallet2::pending_tx> ptx_vector;
-
-
try {
transaction->m_pending_tx = m_wallet->create_transactions_2(dsts, fake_outs_count, 0 /* unlock_time */,
0 /* unused fee arg*/, extra, m_trustedDaemon);