From 4bfb81a7f56eb819da327a0a4820c0b8c152d0cd Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 30 Oct 2016 08:48:31 +0000 Subject: simplewallet: remove destinations with zero amount in sign_transfer This will happen when sending to another address, after removing the fee. --- src/simplewallet/simplewallet.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/simplewallet/simplewallet.cpp') diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 09c574528..652a5535d 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -3154,6 +3154,8 @@ bool simple_wallet::accept_loaded_tx(const tools::wallet2::unsigned_tx_set &txs) } change = cd.change_dts.amount; it->second -= cd.change_dts.amount; + if (it->second == 0) + dests.erase(get_account_address_as_str(m_wallet->testnet(), cd.change_dts.addr)); } } std::string dest_string; -- cgit v1.2.3