diff options
author | Ilya Kitaev <mbg033@gmail.com> | 2016-06-23 16:23:09 +0300 |
---|---|---|
committer | Ilya Kitaev <mbg033@gmail.com> | 2016-06-23 16:23:09 +0300 |
commit | ab61ba0c9b9e39fb73a11e4d38dc5c37e453e6c7 (patch) | |
tree | a9bf9b3b2b00bb3bf9e0bd467cc55db24255d724 /src/wallet/api | |
parent | WalletManager::findWallets: searching by "keys" files instead of (diff) | |
parent | PendingTransactionImpl: pointer->reference (diff) | |
download | monero-ab61ba0c9b9e39fb73a11e4d38dc5c37e453e6c7.tar.xz |
Merge branch 'master' of https://github.com/mbg033/bitmonero
Diffstat (limited to 'src/wallet/api')
-rw-r--r-- | src/wallet/api/wallet.cpp | 8 |
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); |