Skip to content

Commit

Permalink
fix false positive for already init coins
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed Dec 20, 2023
1 parent f74a836 commit dbd7eb1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/core/atomicdex/services/mm2/mm2.service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,16 +686,18 @@ namespace atomic_dex
auto [res, error] = this->process_batch_enable_answer(answer);
if (!res)
{
SPDLOG_DEBUG(
"bad answer for: [{}] -> removing it from enabling, idx: {}, tickers size: {}, answers size: {}", coins[idx].ticker, idx,
coins.size(), answers.size());
if (error.find("already initialized") != std::string::npos)
if (error.find("is initialized already") != std::string::npos)
{
SPDLOG_INFO("{} {}: ", coins[idx].ticker, error);
activated_coins.push_back(std::move(coins[idx]));
}
else
{
SPDLOG_DEBUG(
"bad answer for: [{}] -> removing it from enabling, idx: {}, tickers size: {}, answers size: {}",
coins[idx].ticker, idx,
coins.size(), answers.size()
);
failed_coins.push_back(std::move(coins[idx]));
this->dispatcher_.trigger<enabling_coin_failed>(coins[idx].ticker, error);
SPDLOG_ERROR(error);
Expand Down

0 comments on commit dbd7eb1

Please sign in to comment.