aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-11-24 13:00:32 +0200
committerRiccardo Spagni <ric@spagni.net>2016-11-24 13:00:32 +0200
commit2497a2d547eb420d12146e747815cbc403e64ae3 (patch)
treed9b4fd719a25eff666cfda2c6ac2119a1f7ffa15 /src/wallet/wallet2.cpp
parentMerge pull request #1368 (diff)
parentsimplewallet: remove double confirmation when submitting signed tx (diff)
downloadmonero-2497a2d547eb420d12146e747815cbc403e64ae3.tar.xz
Merge pull request #1369
6d76072 simplewallet: remove double confirmation when submitting signed tx (moneromooo-monero) 92dea04 wallet2: fix wrong change being recorded for cold signed txes (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 42deb337f..ea3994435 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -2756,7 +2756,7 @@ void wallet2::add_unconfirmed_tx(const cryptonote::transaction& tx, uint64_t amo
utd.m_amount_out = 0;
for (const auto &d: dests)
utd.m_amount_out += d.amount;
- utd.m_amount_out += change_amount;
+ utd.m_amount_out += change_amount; // dests does not contain change
utd.m_change = change_amount;
utd.m_sent_time = time(NULL);
utd.m_tx = (const cryptonote::transaction_prefix&)tx;
@@ -3083,7 +3083,7 @@ bool wallet2::sign_tx(const std::string &unsigned_filename, const std::string &s
ptx.change_dts = sd.change_dts;
ptx.selected_transfers = sd.selected_transfers;
ptx.tx_key = rct::rct2sk(rct::identity()); // don't send it back to the untrusted view wallet
- ptx.dests = sd.splitted_dsts;
+ ptx.dests = sd.dests;
ptx.construction_data = sd;
txs.push_back(ptx);
@@ -3682,6 +3682,7 @@ void wallet2::transfer_selected(const std::vector<cryptonote::tx_destination_ent
ptx.construction_data.extra = tx.extra;
ptx.construction_data.unlock_time = unlock_time;
ptx.construction_data.use_rct = false;
+ ptx.construction_data.dests = dsts;
}
void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry> dsts, const std::list<size_t> selected_transfers, size_t fake_outputs_count,
@@ -3802,6 +3803,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
ptx.construction_data.extra = tx.extra;
ptx.construction_data.unlock_time = unlock_time;
ptx.construction_data.use_rct = true;
+ ptx.construction_data.dests = dsts;
}
static size_t estimate_rct_tx_size(int n_inputs, int mixin, int n_outputs)