From f59ac9af4223f20b8348c82301d2d82622da6455 Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 20 Aug 2019 10:17:38 -0400 Subject: [PATCH] sweepUnlock modifies original to not sweep each subaddress individually --- src/wallet/monero_wallet.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/wallet/monero_wallet.cpp b/src/wallet/monero_wallet.cpp index 657e2dc..845de9b 100644 --- a/src/wallet/monero_wallet.cpp +++ b/src/wallet/monero_wallet.cpp @@ -1269,12 +1269,12 @@ namespace monero { vector monero_wallet::get_accounts(bool include_subaddresses) const { MTRACE("get_accounts(" << include_subaddresses << ")"); - throw runtime_error("Not implemented"); + return get_accounts(include_subaddresses, ""); } vector monero_wallet::get_accounts(const string& tag) const { MTRACE("get_accounts(" << tag << ")"); - throw runtime_error("Not implemented"); + return get_accounts(false, tag); } vector monero_wallet::get_accounts(bool include_subaddresses, const string& tag) const { @@ -2014,11 +2014,10 @@ namespace monero { vector tx_sets; for (pair> subaddress_indices_pair : indices) { - // copy the request to not modify the original + // copy and modify the original request monero_send_request copy = request.copy(); - - // set the account to sweep from copy.m_account_index = subaddress_indices_pair.first; + copy.m_sweep_each_subaddress = false; // sweep all subaddresses together // TODO monero core: can this reveal outputs belong to the same wallet? if (copy.m_sweep_each_subaddress == boost::none || copy.m_sweep_each_subaddress.get() != true) {