From db3489a02beb1091842c4ef3e5d274bcbd46ab30 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Mon, 11 Sep 2023 20:35:45 +0200 Subject: [PATCH] fixed minor bug for ionic swaps --- src/wallet/wallet2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 7fcf76d5..3610e925 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -6308,6 +6308,8 @@ bool wallet2::select_indices_for_transfer(assets_selection_context& needed_money // for (auto& item : needed_money_map) { + if(item.second.needed_amount == 0) + continue; auto asset_cashe_it = m_found_free_amounts.find(item.first); WLT_THROW_IF_FALSE_WALLET_EX_MES(asset_cashe_it != m_found_free_amounts.end(), error::not_enough_money, "", item.second.found_amount, item.second.needed_amount, 0, item.first); item.second.found_amount = select_indices_for_transfer(selected_indexes, asset_cashe_it->second, item.second.needed_amount, fake_outputs_count);