From c02678659208493a3b9500239ea8711364b01846 Mon Sep 17 00:00:00 2001 From: woodser Date: Sun, 25 Aug 2019 10:08:46 -0400 Subject: [PATCH] set destination sweep amount in return tx destinations --- src/wallet/monero_wallet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wallet/monero_wallet.cpp b/src/wallet/monero_wallet.cpp index 9719de8..b6a4be0 100644 --- a/src/wallet/monero_wallet.cpp +++ b/src/wallet/monero_wallet.cpp @@ -2133,6 +2133,8 @@ namespace monero { shared_ptr out_transfer = make_shared(); tx->m_outgoing_transfer = out_transfer; out_transfer->m_amount = *tx_amounts_iter; + shared_ptr destination = make_shared(request.m_destinations[0]->m_address.get(), out_transfer->m_amount.get()); + out_transfer->m_destinations.push_back(destination); // init other known fields tx->m_payment_id = request.m_payment_id; @@ -2149,7 +2151,6 @@ namespace monero { if (tx->m_is_relayed.get()) tx->m_last_relayed_timestamp = static_cast(time(NULL)); // set last relayed timestamp to current time iff relayed // TODO monero core: this should be encapsulated in wallet2 out_transfer->m_account_index = request.m_account_index; if (request.m_subaddress_indices.size() == 1) out_transfer->m_subaddress_indices.push_back(request.m_subaddress_indices[0]); // subaddress index is known iff 1 requested // TODO: get all known subaddress indices here - out_transfer->m_destinations = request.m_destinations; // iterate to next element tx_keys_iter++;