aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-10-22 22:15:50 +0200
committerRiccardo Spagni <ric@spagni.net>2016-10-22 22:15:50 +0200
commitf800390ccccb55a73283535fb15608d324bc9e71 (patch)
tree19402c11e9c9cc20b214c41384ebf509584ae4da /src/simplewallet
parentMerge pull request #1223 (diff)
parentsimplewallet: fix sweep_all misreporting sweeped amount for rct outputs (diff)
downloadmonero-f800390ccccb55a73283535fb15608d324bc9e71.tar.xz
Merge pull request #1224
8231997 simplewallet: fix sweep_all misreporting sweeped amount for rct outputs (moneromooo-monero) 985f61a wallet: force 0 mixin transactions to use pre-rct txes (moneromooo-monero)
Diffstat (limited to 'src/simplewallet')
-rw-r--r--src/simplewallet/simplewallet.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 22f0e3b6d..baa70bc0b 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -2925,11 +2925,8 @@ bool simple_wallet::sweep_unmixable(const std::vector<std::string> &args_)
for (size_t n = 0; n < ptx_vector.size(); ++n)
{
total_fee += ptx_vector[n].fee;
- for (const auto &vin: ptx_vector[n].tx.vin)
- {
- if (vin.type() == typeid(txin_to_key))
- total_unmixable += boost::get<txin_to_key>(vin).amount;
- }
+ for (auto i: ptx_vector[n].selected_transfers)
+ total_unmixable += m_wallet->get_transfer_details(i).amount();
}
std::string prompt_str = tr("Sweeping ") + print_money(total_unmixable);
@@ -3187,11 +3184,8 @@ bool simple_wallet::sweep_all(const std::vector<std::string> &args_)
for (size_t n = 0; n < ptx_vector.size(); ++n)
{
total_fee += ptx_vector[n].fee;
- for (const auto &vin: ptx_vector[n].tx.vin)
- {
- if (vin.type() == typeid(txin_to_key))
- total_sent += boost::get<txin_to_key>(vin).amount;
- }
+ for (auto i: ptx_vector[n].selected_transfers)
+ total_sent += m_wallet->get_transfer_details(i).amount();
}
std::string prompt_str;