diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-10-30 08:48:31 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-10-30 09:15:04 +0000 |
commit | 4bfb81a7f56eb819da327a0a4820c0b8c152d0cd (patch) | |
tree | cc57f3b421bd6df2b386bf51df584fc01f86249e /src/simplewallet | |
parent | Merge pull request #1270 (diff) | |
download | monero-4bfb81a7f56eb819da327a0a4820c0b8c152d0cd.tar.xz |
simplewallet: remove destinations with zero amount in sign_transfer
This will happen when sending to another address, after removing
the fee.
Diffstat (limited to 'src/simplewallet')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; |