From d574f9d8150a440b59bc2552c07db3841ccf4aee Mon Sep 17 00:00:00 2001 From: smk762 Date: Fri, 15 Dec 2023 20:20:02 +0800 Subject: [PATCH 01/43] rename variable to something more obvious --- .../services/price/orderbook.scanner.service.cpp | 10 +++++----- .../services/price/orderbook.scanner.service.hpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/atomicdex/services/price/orderbook.scanner.service.cpp b/src/core/atomicdex/services/price/orderbook.scanner.service.cpp index 634d8ad945..72de767369 100644 --- a/src/core/atomicdex/services/price/orderbook.scanner.service.cpp +++ b/src/core/atomicdex/services/price/orderbook.scanner.service.cpp @@ -38,7 +38,7 @@ namespace atomic_dex void orderbook_scanner_service::process_best_orders() { - if (m_rpc_busy) + if (m_bestorders_busy) { // SPDLOG_INFO("process_best_orders is busy - skipping"); return; @@ -67,7 +67,7 @@ namespace atomic_dex // best_orders_req_json["userpass"] = "*****"; // SPDLOG_INFO("best_orders request: {}", best_orders_req_json.dump(4)); - this->m_rpc_busy = true; + this->m_bestorders_busy = true; emit trading_pg.get_orderbook_wrapper()->bestOrdersBusyChanged(); //! Treat answer auto answer_functor = [this, &trading_pg](web::http::http_response resp) { @@ -81,7 +81,7 @@ namespace atomic_dex this->m_best_orders_infos = best_order_answer.result.value(); } } - this->m_rpc_busy = false; + this->m_bestorders_busy = false; this->dispatcher_.trigger(false); emit trading_pg.get_orderbook_wrapper()->bestOrdersBusyChanged(); }; @@ -96,7 +96,7 @@ namespace atomic_dex catch (const std::exception& e) { SPDLOG_ERROR("pplx task error in [process_best_orders]: {}", e.what()); - this->m_rpc_busy = false; + this->m_bestorders_busy = false; this->dispatcher_.trigger(true); } }); @@ -134,7 +134,7 @@ namespace atomic_dex bool orderbook_scanner_service::is_best_orders_busy() const { - return m_rpc_busy.load(); + return m_bestorders_busy.load(); } t_orders_contents diff --git a/src/core/atomicdex/services/price/orderbook.scanner.service.hpp b/src/core/atomicdex/services/price/orderbook.scanner.service.hpp index 528ddcd905..27c7bed8db 100644 --- a/src/core/atomicdex/services/price/orderbook.scanner.service.hpp +++ b/src/core/atomicdex/services/price/orderbook.scanner.service.hpp @@ -38,7 +38,7 @@ namespace atomic_dex ag::ecs::system_manager& m_system_manager; t_best_orders_synchronized m_best_orders_infos; t_update_time_point m_update_clock; - std::atomic_bool m_rpc_busy{false}; + std::atomic_bool m_bestorders_busy{false}; public: //! Constructor From 44a1e6e91b1a1d779dcb2b129a20a928ee3f4fd3 Mon Sep 17 00:00:00 2001 From: smk762 Date: Fri, 15 Dec 2023 20:22:19 +0800 Subject: [PATCH 02/43] update variable to something more obvious --- src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp | 2 +- src/core/atomicdex/services/price/orderbook.scanner.service.cpp | 2 +- src/core/atomicdex/services/price/orderbook.scanner.service.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp index 6e36fbf098..47a7053ac6 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp @@ -83,7 +83,7 @@ namespace atomic_dex { this->m_asks->refresh_orderbook(answer.asks); this->m_bids->refresh_orderbook(answer.bids); - const auto data = this->m_system_manager.get_system().get_data(); + const auto data = this->m_system_manager.get_system().get_bestorders_data(); if (data.empty()) { m_best_orders->clear_orderbook(); diff --git a/src/core/atomicdex/services/price/orderbook.scanner.service.cpp b/src/core/atomicdex/services/price/orderbook.scanner.service.cpp index 72de767369..7c255fd748 100644 --- a/src/core/atomicdex/services/price/orderbook.scanner.service.cpp +++ b/src/core/atomicdex/services/price/orderbook.scanner.service.cpp @@ -138,7 +138,7 @@ namespace atomic_dex } t_orders_contents - orderbook_scanner_service::get_data() const + orderbook_scanner_service::get_bestorders_data() const { return m_best_orders_infos.get().result; } diff --git a/src/core/atomicdex/services/price/orderbook.scanner.service.hpp b/src/core/atomicdex/services/price/orderbook.scanner.service.hpp index 27c7bed8db..99bbcacb55 100644 --- a/src/core/atomicdex/services/price/orderbook.scanner.service.hpp +++ b/src/core/atomicdex/services/price/orderbook.scanner.service.hpp @@ -55,7 +55,7 @@ namespace atomic_dex [[nodiscard]] bool is_best_orders_busy() const ; - [[nodiscard]] t_orders_contents get_data() const ; + [[nodiscard]] t_orders_contents get_bestorders_data() const ; }; } // namespace atomic_dex From 7bbf144343a8dac68f42da8e7646c9d4fe02c760 Mon Sep 17 00:00:00 2001 From: smk762 Date: Sat, 16 Dec 2023 21:31:24 +0800 Subject: [PATCH 03/43] use generalised async func for orderbook --- src/core/atomicdex/api/mm2/mm2.client.cpp | 8 +- src/core/atomicdex/api/mm2/mm2.cpp | 1 - .../api/mm2/orderbook.order.contents.hpp | 2 +- .../api/mm2/rpc_v1/rpc.my_tx_history.hpp | 1 - .../rpc2.enable_bch_with_tokens_rpc.cpp | 2 +- .../rpc2.enable_bch_with_tokens_rpc.hpp | 16 ++++ .../api/mm2/rpc_v2/rpc2.my_tx_history.cpp | 19 ++++- .../api/mm2/rpc_v2/rpc2.my_tx_history.hpp | 8 +- .../api/mm2/rpc_v2/rpc2.orderbook.cpp | 47 ++++++------ .../api/mm2/rpc_v2/rpc2.orderbook.hpp | 75 ++++++++++--------- src/core/atomicdex/pages/qt.trading.page.cpp | 2 +- .../pages/widgets/dex/qt.orderbook.cpp | 4 +- .../pages/widgets/dex/qt.orderbook.hpp | 4 +- .../atomicdex/services/mm2/mm2.service.cpp | 75 +++++++++++-------- .../atomicdex/services/mm2/mm2.service.hpp | 8 +- 15 files changed, 161 insertions(+), 111 deletions(-) diff --git a/src/core/atomicdex/api/mm2/mm2.client.cpp b/src/core/atomicdex/api/mm2/mm2.client.cpp index 385376eecd..05f499087a 100644 --- a/src/core/atomicdex/api/mm2/mm2.client.cpp +++ b/src/core/atomicdex/api/mm2/mm2.client.cpp @@ -26,6 +26,7 @@ #include "atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp" @@ -160,13 +161,14 @@ namespace atomic_dex::mm2 using request_type = typename Rpc::expected_request_type; process_rpc_async(request_type{}, on_rpc_processed); } - template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); + template void mm2_client::process_rpc_async(const std::function&); + template void mm2_client::process_rpc_async(const std::function&); + template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); - template void mm2_client::process_rpc_async(const std::function&); - template void mm2_client::process_rpc_async(const std::function&); + template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(typename Rpc::expected_request_type request, const std::function& on_rpc_processed) diff --git a/src/core/atomicdex/api/mm2/mm2.cpp b/src/core/atomicdex/api/mm2/mm2.cpp index 62aefed3cd..53761b93e0 100644 --- a/src/core/atomicdex/api/mm2/mm2.cpp +++ b/src/core/atomicdex/api/mm2/mm2.cpp @@ -710,7 +710,6 @@ namespace atomic_dex::mm2 template mm2::withdraw_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); template mm2::withdraw_status_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); template mm2::my_orders_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); - template mm2::orderbook_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); template mm2::trade_fee_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); template mm2::max_taker_vol_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); template mm2::min_volume_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); diff --git a/src/core/atomicdex/api/mm2/orderbook.order.contents.hpp b/src/core/atomicdex/api/mm2/orderbook.order.contents.hpp index 0f350e8dab..48816560ce 100644 --- a/src/core/atomicdex/api/mm2/orderbook.order.contents.hpp +++ b/src/core/atomicdex/api/mm2/orderbook.order.contents.hpp @@ -55,7 +55,7 @@ namespace atomic_dex::mm2 std::string uuid; std::string depth_percent; bool is_mine; - std::optional rel_coin{std::nullopt}; + std::optional rel_coin; std::string to_string() const noexcept; }; diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp index 1da0cebe99..65d5ef4ece 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp @@ -4,7 +4,6 @@ #pragma once #include "atomicdex/api/mm2/rpc.hpp" -#include "atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp" namespace atomic_dex::mm2 { diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp index 0b0529952d..1cee8922d5 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp @@ -1,6 +1,6 @@ #include -#include "rpc2.enable_bch_with_tokens_rpc.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp" namespace atomic_dex::mm2 { diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp index dc74ce6b93..55c9caa8e6 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp @@ -1,3 +1,19 @@ +/****************************************************************************** + * Copyright © 2013-2024 The Komodo Platform Developers. * + * * + * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * + * the top-level directory of this distribution for the individual copyright * + * holder information and the developer policies on copyright and licensing. * + * * + * Unless otherwise agreed in a custom licensing agreement, no part of the * + * Komodo Platform software, including this file may be copied, modified, * + * propagated or distributed except according to the terms contained in the * + * LICENSE file * + * * + * Removal or modification of this copyright notice is prohibited. * + * * + ******************************************************************************/ + #pragma once #include diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.cpp index 800ffb4cad..9b4a104837 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.cpp @@ -1,8 +1,23 @@ -// komodo-wallet -// Author(s): syl +/****************************************************************************** + * Copyright © 2013-2021 The Komodo Platform Developers. * + * * + * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * + * the top-level directory of this distribution for the individual copyright * + * holder information and the developer policies on copyright and licensing. * + * * + * Unless otherwise agreed in a custom licensing agreement, no part of the * + * Komodo Platform software, including this file may be copied, modified, * + * propagated or distributed except according to the terms contained in the * + * LICENSE file * + * * + * Removal or modification of this copyright notice is prohibited. * + * * + ******************************************************************************/ +//! Deps #include +//! Project Headers #include "atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp" namespace atomic_dex::mm2 diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp index 72d4c811fb..6900a5ba4c 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp @@ -11,7 +11,7 @@ namespace atomic_dex::mm2 { - struct my_tx_history_rpc + struct my_tx_history_v2_rpc { static constexpr auto endpoint = "my_tx_history"; static constexpr bool is_v2 = true; @@ -37,9 +37,9 @@ namespace atomic_dex::mm2 std::optional error; }; - using my_tx_history_request_rpc = my_tx_history_rpc::expected_request_type; - using my_tx_history_result_rpc = my_tx_history_rpc::expected_result_type; - using my_tx_history_error_rpc = my_tx_history_rpc::expected_error_type; + using my_tx_history_request_rpc = my_tx_history_v2_rpc::expected_request_type; + using my_tx_history_result_rpc = my_tx_history_v2_rpc::expected_result_type; + using my_tx_history_error_rpc = my_tx_history_v2_rpc::expected_error_type; void to_json(nlohmann::json& j, const my_tx_history_request_rpc& in); void from_json(const nlohmann::json& json, my_tx_history_result_rpc& out); diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp index b97e48f1a8..f1fb992d5c 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp @@ -24,24 +24,29 @@ namespace atomic_dex::mm2 { void - from_json(const nlohmann::json& j, orderbook_answer& answer) + to_json(nlohmann::json& j, const orderbook_request_rpc& req) { - using namespace date; - // SPDLOG_INFO("got orderbook data..."); + j["params"]["base"] = req.base; + j["params"]["rel"] = req.rel; + } - j.at("result").at("base").get_to(answer.base); - j.at("result").at("rel").get_to(answer.rel); - j.at("result").at("num_asks").get_to(answer.numasks); - j.at("result").at("num_bids").get_to(answer.numbids); - j.at("result").at("net_id").get_to(answer.netid); - j.at("result").at("timestamp").get_to(answer.timestamp); - j.at("result").at("bids").get_to(answer.bids); - j.at("result").at("asks").get_to(answer.asks); + void + from_json(const nlohmann::json& j, orderbook_result_rpc& resp) + { + using namespace date; + j.at("result").at("base").get_to(resp.base); + j.at("result").at("rel").get_to(resp.rel); + j.at("result").at("num_asks").get_to(resp.numasks); + j.at("result").at("num_bids").get_to(resp.numbids); + j.at("result").at("net_id").get_to(resp.netid); + j.at("result").at("timestamp").get_to(resp.timestamp); + j.at("result").at("bids").get_to(resp.bids); + j.at("result").at("asks").get_to(resp.asks); - answer.human_timestamp = atomic_dex::utils::to_human_date(answer.timestamp, "%Y-%m-%d %I:%M:%S"); + resp.human_timestamp = atomic_dex::utils::to_human_date(resp.timestamp, "%Y-%m-%d %I:%M:%S"); t_float_50 result_asks_f(0); - for (auto&& cur_asks: answer.asks) { + for (auto&& cur_asks: resp.asks) { cur_asks.min_volume = cur_asks.base_min_volume; cur_asks.min_volume_fraction_numer = cur_asks.base_min_volume_numer; cur_asks.min_volume_fraction_denom = cur_asks.base_min_volume_denom; @@ -59,10 +64,10 @@ namespace atomic_dex::mm2 cur_asks.total = atomic_dex::utils::adjust_precision(total_f.str()); result_asks_f = result_asks_f + safe_float(cur_asks.max_volume); } - answer.asks_total_volume = result_asks_f.str(); + resp.asks_total_volume = result_asks_f.str(); t_float_50 result_bids_f(0); - for (auto& cur_bids: answer.bids) + for (auto& cur_bids: resp.bids) { cur_bids.min_volume = cur_bids.base_min_volume; cur_bids.min_volume_fraction_numer = cur_bids.base_min_volume_numer; @@ -82,16 +87,16 @@ namespace atomic_dex::mm2 cur_bids.total = atomic_dex::utils::adjust_precision(total_f.str()); result_bids_f = result_bids_f + safe_float(cur_bids.max_volume); } - answer.bids_total_volume = result_bids_f.str(); + resp.bids_total_volume = result_bids_f.str(); - for (auto&& cur_asks: answer.asks) + for (auto&& cur_asks: resp.asks) { t_float_50 percent_f = safe_float(cur_asks.max_volume) / result_asks_f; cur_asks.depth_percent = atomic_dex::utils::adjust_precision(percent_f.str()); // SPDLOG_INFO("cur_asks: {}", cur_asks.to_string()); } - for (auto&& cur_bids: answer.bids) + for (auto&& cur_bids: resp.bids) { t_float_50 percent_f = safe_float(cur_bids.max_volume) / result_bids_f; cur_bids.depth_percent = atomic_dex::utils::adjust_precision(percent_f.str()); @@ -99,10 +104,4 @@ namespace atomic_dex::mm2 } } - void - to_json(nlohmann::json& j, const orderbook_request& request) - { - j["params"]["base"] = request.base; - j["params"]["rel"] = request.rel; - } } // namespace atomic_dex::mm2 diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp index 8cd508c801..23e0fe3297 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp @@ -16,48 +16,55 @@ #pragma once -//! Deps -#include +#include +#include -//! Project Headers +#include //> nlohmann::json + +#include "atomicdex/api/mm2/rpc.hpp" #include "atomicdex/api/mm2/orderbook.order.contents.hpp" namespace atomic_dex::mm2 { - struct orderbook_request + struct orderbook_rpc { - std::string base; - std::string rel; - }; + static constexpr auto endpoint = "orderbook"; + static constexpr bool is_v2 = true; - void to_json(nlohmann::json& j, const orderbook_request& request); + struct expected_request_type + { + std::string base; + std::string rel; + }; - struct orderbook_answer - { - std::size_t askdepth{0}; - std::size_t biddepth{0}; - std::vector asks; - std::vector bids; - std::string base; - std::string rel; - std::size_t numasks; - std::size_t numbids; - std::size_t timestamp; - std::size_t netid; - std::string human_timestamp; //! Moment of the orderbook request human readeable - std::string asks_total_volume; - std::string bids_total_volume; - - //! Internal - std::string raw_result; - int rpc_result_code; + struct expected_result_type + { + std::size_t askdepth; + std::size_t biddepth; + std::vector asks; + std::vector bids; + std::string base; + std::string rel; + std::size_t numasks; + std::size_t numbids; + std::size_t timestamp; + std::size_t netid; + std::string human_timestamp; //! human readable orderbook request time + std::string asks_total_volume; + std::string bids_total_volume; + }; + + using expected_error_type = rpc_basic_error_type; + + expected_request_type request; + std::optional result; + std::optional error; }; - void from_json(const nlohmann::json& j, orderbook_answer& answer); -} + using orderbook_request_rpc = orderbook_rpc::expected_request_type; + using orderbook_result_rpc = orderbook_rpc::expected_result_type; + using orderbook_error_rpc = orderbook_rpc::expected_error_type; -namespace atomic_dex -{ - using t_orderbook_request = mm2::orderbook_request; - using t_orderbook_answer = mm2::orderbook_answer; -} \ No newline at end of file + void to_json(nlohmann::json& j, const orderbook_request_rpc& req); + void from_json(const nlohmann::json& j, orderbook_result_rpc& resp); +} diff --git a/src/core/atomicdex/pages/qt.trading.page.cpp b/src/core/atomicdex/pages/qt.trading.page.cpp index a4366f9146..741ad945a5 100644 --- a/src/core/atomicdex/pages/qt.trading.page.cpp +++ b/src/core/atomicdex/pages/qt.trading.page.cpp @@ -485,7 +485,7 @@ namespace atomic_dex case trading_actions::post_process_orderbook_finished: { std::error_code ec; - t_orderbook_answer result = mm2_system.get_orderbook(ec); + mm2::orderbook_result_rpc result = mm2_system.get_orderbook(ec); if (!ec) { diff --git a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp index 47a7053ac6..461cd34a18 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp @@ -79,7 +79,7 @@ namespace atomic_dex } void - qt_orderbook_wrapper::refresh_orderbook(t_orderbook_answer answer) + qt_orderbook_wrapper::refresh_orderbook(mm2::orderbook_result_rpc answer) { this->m_asks->refresh_orderbook(answer.asks); this->m_bids->refresh_orderbook(answer.bids); @@ -102,7 +102,7 @@ namespace atomic_dex } void - qt_orderbook_wrapper::reset_orderbook(t_orderbook_answer answer) + qt_orderbook_wrapper::reset_orderbook(mm2::orderbook_result_rpc answer) { this->m_asks->reset_orderbook(answer.asks); this->m_bids->reset_orderbook(answer.bids); diff --git a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp index 6b2a9b9dd4..606d0cb224 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp @@ -47,8 +47,8 @@ namespace atomic_dex public: void adjust_min_vol(); - void refresh_orderbook(t_orderbook_answer answer); - void reset_orderbook(t_orderbook_answer answer); + void refresh_orderbook(mm2::orderbook_result_rpc answer); + void reset_orderbook(mm2::orderbook_result_rpc answer); void clear_orderbook(); [[nodiscard]] orderbook_model* get_asks() const; [[nodiscard]] orderbook_model* get_bids() const; diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index 72cc67f0bc..04c8c2663f 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -1723,7 +1724,7 @@ namespace atomic_dex } // [smk] Only called by trading_page::process_action() - t_orderbook_answer mm2_service::get_orderbook(t_mm2_ec& ec) const + mm2::orderbook_result_rpc mm2_service::get_orderbook(t_mm2_ec& ec) const { auto&& [base, rel] = this->m_synchronized_ticker_pair.get(); const std::string pair = base + "/" + rel; @@ -1741,31 +1742,50 @@ namespace atomic_dex return orderbook; } - nlohmann::json mm2_service::prepare_batch_orderbook(bool is_a_reset) + + nlohmann::json generate_req(std::string request_name, auto request, bool is_v2=false) { - // SPDLOG_DEBUG("[prepare_batch_orderbook] is_a_reset: {}", is_a_reset); - auto&& [base, rel] = m_synchronized_ticker_pair.get(); - if (rel.empty()) - return nlohmann::json::array(); - nlohmann::json batch = nlohmann::json::array(); + nlohmann::json current_request = mm2::template_request(std::move(request_name), is_v2); + mm2::to_json(current_request, request); + return current_request; + } - auto generate_req = [&batch](std::string request_name, auto request, bool is_v2=false) + nlohmann::json mm2_service::prepare_batch_orderbook(bool is_a_reset) + { + auto callback = [this, is_a_reset](RpcRequest rpc) { - nlohmann::json current_request = mm2::template_request(std::move(request_name), is_v2); - mm2::to_json(current_request, request); - batch.push_back(current_request); + nlohmann::json batch = nlohmann::json::array(); + if (rpc.error) + { + SPDLOG_ERROR("error: bad answer json for orderbook: {}", rpc.error->error); + } + else + { + m_orderbook = rpc.result.value(); + this->dispatcher_.trigger(is_a_reset); + if (is_a_reset) + { + nlohmann::json batch = nlohmann::json::array(); + auto&& [base, rel] = m_synchronized_ticker_pair.get(); + batch.push_back(generate_req("max_taker_vol", mm2::max_taker_vol_request{.coin = base})); + batch.push_back(generate_req("max_taker_vol", mm2::max_taker_vol_request{.coin = rel})); + batch.push_back(generate_req("min_trading_vol", t_min_volume_request{.coin = base})); + batch.push_back(generate_req("min_trading_vol", t_min_volume_request{.coin = rel})); + } + } + return batch; }; - generate_req("orderbook", t_orderbook_request{.base = base, .rel = rel}, true); - if (is_a_reset) - { - generate_req("max_taker_vol", mm2::max_taker_vol_request{.coin = base}); - generate_req("max_taker_vol", mm2::max_taker_vol_request{.coin = rel}); - generate_req("min_trading_vol", t_min_volume_request{.coin = base}); - generate_req("min_trading_vol", t_min_volume_request{.coin = rel}); - } - // SPDLOG_INFO("batch max: {}", batch.dump(4)); - return batch; + auto&& [base, rel] = m_synchronized_ticker_pair.get(); + // Avoid segwit coins self pairing, e.g. LTC/LTC-segwit + std::string base_ticker = boost::replace_all_copy(base, "-segwit", ""); + std::string rel_ticker = boost::replace_all_copy(rel, "-segwit", ""); + if (rel.empty() || base.empty() || base_ticker == rel_ticker) + SPDLOG_ERROR("Invalid ticker pair while requesting orderbook: {} {}", base, rel); + return nlohmann::json::array(); + + mm2::orderbook_rpc rpc{.request={.base = base, .rel = rel}}; + m_mm2_client.process_rpc_async(rpc.request, callback); } void mm2_service::process_orderbook(bool is_a_reset) @@ -1776,7 +1796,6 @@ namespace atomic_dex auto answer_functor = [this, is_a_reset](web::http::http_response resp) { - auto&& [base, rel] = m_synchronized_ticker_pair.get(); auto answer = mm2::basic_batch_answer(resp); if (answer.is_array()) { @@ -1786,16 +1805,15 @@ namespace atomic_dex return; } - auto orderbook_answer = mm2::rpc_process_answer_batch(answer[0], "orderbook"); - if (is_a_reset) { - if (answer.size() < 5) + if (answer.size() < 4) { SPDLOG_ERROR("Answer array did not contain enough elements"); return; } + auto&& [base, rel] = m_synchronized_ticker_pair.get(); auto base_max_taker_vol_answer = mm2::rpc_process_answer_batch(answer[1], "max_taker_vol"); if (base_max_taker_vol_answer.rpc_result_code == 200) { @@ -1828,17 +1846,12 @@ namespace atomic_dex } } - if (orderbook_answer.rpc_result_code == 200) - { - m_orderbook = orderbook_answer; - this->dispatcher_.trigger(is_a_reset); - } } }; m_mm2_client.async_rpc_batch_standalone(batch) .then(answer_functor) - .then([this, batch](pplx::task previous_task) { this->handle_exception_pplx_task(previous_task, "process_orderbook", batch); }); + .then([this, batch](pplx::task previous_task) { this->handle_exception_pplx_task(previous_task, "process_orderbook_extras", batch); }); } void mm2_service::fetch_current_orderbook_thread(bool is_a_reset) diff --git a/src/core/atomicdex/services/mm2/mm2.service.hpp b/src/core/atomicdex/services/mm2/mm2.service.hpp index 53a0e951ac..b7d2ced830 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.hpp +++ b/src/core/atomicdex/services/mm2/mm2.service.hpp @@ -32,9 +32,9 @@ #include "atomicdex/api/mm2/mm2.error.code.hpp" #include "atomicdex/api/mm2/mm2.hpp" #include "atomicdex/api/mm2/rpc_v1/rpc.min_trading_vol.hpp" -#include "atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp" #include "atomicdex/api/mm2/rpc_v1/rpc.max_taker_vol.hpp" #include "atomicdex/api/mm2/rpc_v1/rpc.my_balance.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp" @@ -68,7 +68,7 @@ namespace atomic_dex using t_mm2_time_point = std::chrono::high_resolution_clock::time_point; using t_balance_registry = std::unordered_map; using t_tx_registry = t_shared_synchronized_value>>; - using t_orderbook = boost::synchronized_value; + using t_orderbook = boost::synchronized_value; using t_orders_and_swaps = boost::synchronized_value; using t_synchronized_ticker_pair = boost::synchronized_value>; using t_synchronized_max_taker_vol = boost::synchronized_value; @@ -109,7 +109,7 @@ namespace atomic_dex t_coins_registry& m_coins_informations{entity_registry_.set()}; t_balance_registry m_balance_informations; t_tx_registry m_tx_informations; - t_orderbook m_orderbook{t_orderbook_answer{}}; + t_orderbook m_orderbook{mm2::orderbook_result_rpc{}}; t_orders_and_swaps m_orders_and_swaps{orders_and_swaps{}}; t_mm2_raw_coins_registry m_mm2_raw_coins_cfg{parse_raw_mm2_coins_file()}; @@ -245,7 +245,7 @@ namespace atomic_dex [[nodiscard]] bool has_coin(const std::string& ticker) const; //! Get Current orderbook - [[nodiscard]] t_orderbook_answer get_orderbook(t_mm2_ec& ec) const; + [[nodiscard]] mm2::orderbook_result_rpc get_orderbook(t_mm2_ec& ec) const; //! Get Swaps [[nodiscard]] orders_and_swaps get_orders_and_swaps() const; From e974d298b8b4369960b0a5779dca50c8d703acaf Mon Sep 17 00:00:00 2001 From: smk762 Date: Sun, 17 Dec 2023 03:11:22 +0800 Subject: [PATCH 04/43] complete async orderbook --- src/core/atomicdex/api/mm2/mm2.client.cpp | 3 +- .../api/mm2/rpc_v1/rpc.my_tx_history.hpp | 1 + .../rpc2.enable_bch_with_tokens_rpc.hpp | 1 + .../api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp | 1 + .../rpc_v2/rpc2.enable_tendermint_token.hpp | 1 + .../rpc2.enable_tendermint_with_assets.hpp | 1 + .../api/mm2/rpc_v2/rpc2.get_public_key.hpp | 1 + .../api/mm2/rpc_v2/rpc2.my_tx_history.hpp | 1 + .../api/mm2/rpc_v2/rpc2.orderbook.cpp | 40 ++++++++++++++----- .../api/mm2/rpc_v2/rpc2.orderbook.hpp | 1 + .../atomicdex/services/mm2/mm2.service.cpp | 37 ++++++++++------- .../atomicdex/services/mm2/mm2.service.hpp | 3 +- .../atomicdex/utilities/global.utilities.cpp | 8 ++++ .../atomicdex/utilities/global.utilities.hpp | 1 + 14 files changed, 73 insertions(+), 27 deletions(-) diff --git a/src/core/atomicdex/api/mm2/mm2.client.cpp b/src/core/atomicdex/api/mm2/mm2.client.cpp index 05f499087a..eb4e263a01 100644 --- a/src/core/atomicdex/api/mm2/mm2.client.cpp +++ b/src/core/atomicdex/api/mm2/mm2.client.cpp @@ -76,9 +76,9 @@ namespace // SPDLOG_DEBUG("rpc answer: {}", TO_STD_STR(answer.extract_string(true).get())); Rpc rpc; auto json_answer = nlohmann::json::parse(TO_STD_STR(answer.extract_string(true).get())); + rpc.raw_result = json_answer.at("result").dump(); if (Rpc::is_v2) { - // SPDLOG_DEBUG("v2 rpc answer") if (answer.status_code() == 200) rpc.result = json_answer.at("result").get(); else @@ -181,6 +181,7 @@ namespace atomic_dex::mm2 try { auto rpc = process_rpc_answer(resp); + // SPDLOG_DEBUG("process_rpc_answer rpc.result: {}", rpc.raw_result); rpc.request = request; on_rpc_processed(rpc); } diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp index 65d5ef4ece..e59cd15d8e 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_tx_history.hpp @@ -21,6 +21,7 @@ namespace atomic_dex::mm2 expected_request_type request; std::optional result; std::optional error; + std::string raw_result; }; using my_tx_history_request_v1_rpc = my_tx_history_v1_rpc::expected_request_type; diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp index 55c9caa8e6..dd0d0b31d6 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp @@ -93,6 +93,7 @@ namespace atomic_dex::mm2 expected_request_type request; std::optional result; std::optional error; + std::string raw_result; }; using enable_bch_with_tokens_request_rpc = enable_bch_with_tokens_rpc::expected_request_type; diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp index 33a961cee0..d647ab818c 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp @@ -51,6 +51,7 @@ namespace atomic_dex::mm2 expected_request_type request; std::optional result; std::optional error; + std::string raw_result; }; using enable_slp_rpc_request = enable_slp_rpc::expected_request_type; diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp index 09b6c5d486..cc950ebebd 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp @@ -48,6 +48,7 @@ namespace atomic_dex::mm2 expected_request_type request; std::optional result; std::optional error; + std::string raw_result; }; using enable_tendermint_token_rpc_request = enable_tendermint_token_rpc::expected_request_type; diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp index 22aed96a49..76876d0a89 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp @@ -47,6 +47,7 @@ namespace atomic_dex::mm2 expected_request_type request; std::optional result; std::optional error; + std::string raw_result; }; using enable_tendermint_with_assets_request_rpc = enable_tendermint_with_assets_rpc::expected_request_type; diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp index 6f9c8e1aca..7a9b855f3a 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp @@ -43,6 +43,7 @@ namespace atomic_dex::mm2 expected_request_type request; std::optional result; std::optional error; + std::string raw_result; }; using get_public_key_rpc_request = get_public_key_rpc::expected_request_type; diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp index 6900a5ba4c..71d7c2ff0d 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp @@ -35,6 +35,7 @@ namespace atomic_dex::mm2 expected_request_type request; std::optional result; std::optional error; + std::string raw_result; }; using my_tx_history_request_rpc = my_tx_history_v2_rpc::expected_request_type; diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp index f1fb992d5c..a17ee52ca7 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp @@ -16,6 +16,7 @@ //! Deps #include +#include //! Project Headers #include "atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp" @@ -26,22 +27,41 @@ namespace atomic_dex::mm2 void to_json(nlohmann::json& j, const orderbook_request_rpc& req) { - j["params"]["base"] = req.base; - j["params"]["rel"] = req.rel; + j["base"] = req.base; + j["rel"] = req.rel; } void from_json(const nlohmann::json& j, orderbook_result_rpc& resp) { using namespace date; - j.at("result").at("base").get_to(resp.base); - j.at("result").at("rel").get_to(resp.rel); - j.at("result").at("num_asks").get_to(resp.numasks); - j.at("result").at("num_bids").get_to(resp.numbids); - j.at("result").at("net_id").get_to(resp.netid); - j.at("result").at("timestamp").get_to(resp.timestamp); - j.at("result").at("bids").get_to(resp.bids); - j.at("result").at("asks").get_to(resp.asks); + // atomic_dex::utils::json_keys(j); + nlohmann::json k; + if (j.contains("result")) + { + // Not sure how why where it is being returned in this format + SPDLOG_DEBUG("orderbook_result_rpc: result"); + j.at("result").at("rel").get_to(resp.rel); + j.at("result").at("num_asks").get_to(resp.numasks); + j.at("result").at("num_bids").get_to(resp.numbids); + j.at("result").at("net_id").get_to(resp.netid); + j.at("result").at("timestamp").get_to(resp.timestamp); + j.at("result").at("bids").get_to(resp.bids); + j.at("result").at("asks").get_to(resp.asks); + j.at("result").at("base").get_to(resp.base); + } + else + { + SPDLOG_DEBUG("orderbook_result_rpc: base"); + j.at("base").get_to(resp.base); + j.at("rel").get_to(resp.rel); + j.at("num_asks").get_to(resp.numasks); + j.at("num_bids").get_to(resp.numbids); + j.at("net_id").get_to(resp.netid); + j.at("timestamp").get_to(resp.timestamp); + j.at("bids").get_to(resp.bids); + j.at("asks").get_to(resp.asks); + } resp.human_timestamp = atomic_dex::utils::to_human_date(resp.timestamp, "%Y-%m-%d %I:%M:%S"); diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp index 23e0fe3297..e504e85297 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp @@ -59,6 +59,7 @@ namespace atomic_dex::mm2 expected_request_type request; std::optional result; std::optional error; + std::string raw_result; }; using orderbook_request_rpc = orderbook_rpc::expected_request_type; diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index 04c8c2663f..8bd1feab90 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -1732,13 +1732,16 @@ namespace atomic_dex if (orderbook.base.empty() && orderbook.rel.empty()) { ec = dextop_error::orderbook_empty; + SPDLOG_WARN("base/rel/orderbook mismatch: {} != {}", pair, orderbook.base + "/" + rel); return {}; } if (pair != orderbook.base + "/" + rel) { + SPDLOG_WARN("base/rel/orderbook mismatch: {} != {}", pair, orderbook.base + "/" + rel); ec = dextop_error::orderbook_ticker_not_found; return {}; } + // SPDLOG_DEBUG("orderbook active: {}/{}", orderbook.base + "/" + orderbook.rel); return orderbook; } @@ -1750,14 +1753,21 @@ namespace atomic_dex return current_request; } - nlohmann::json mm2_service::prepare_batch_orderbook(bool is_a_reset) + + void mm2_service::process_orderbook(bool is_a_reset) + { + prepare_orderbook(is_a_reset); + } + + + void mm2_service::prepare_orderbook(bool is_a_reset) { auto callback = [this, is_a_reset](RpcRequest rpc) { nlohmann::json batch = nlohmann::json::array(); if (rpc.error) { - SPDLOG_ERROR("error: bad answer json for orderbook: {}", rpc.error->error); + SPDLOG_ERROR("error: bad answer json for prepare_orderbook: {}", rpc.error->error); } else { @@ -1771,9 +1781,9 @@ namespace atomic_dex batch.push_back(generate_req("max_taker_vol", mm2::max_taker_vol_request{.coin = rel})); batch.push_back(generate_req("min_trading_vol", t_min_volume_request{.coin = base})); batch.push_back(generate_req("min_trading_vol", t_min_volume_request{.coin = rel})); + process_orderbook_extras(batch, is_a_reset); } } - return batch; }; auto&& [base, rel] = m_synchronized_ticker_pair.get(); @@ -1782,17 +1792,18 @@ namespace atomic_dex std::string rel_ticker = boost::replace_all_copy(rel, "-segwit", ""); if (rel.empty() || base.empty() || base_ticker == rel_ticker) SPDLOG_ERROR("Invalid ticker pair while requesting orderbook: {} {}", base, rel); - return nlohmann::json::array(); mm2::orderbook_rpc rpc{.request={.base = base, .rel = rel}}; m_mm2_client.process_rpc_async(rpc.request, callback); } - void mm2_service::process_orderbook(bool is_a_reset) + void mm2_service::process_orderbook_extras(nlohmann::json batch, bool is_a_reset) { - auto batch = prepare_batch_orderbook(is_a_reset); if (batch.empty()) + { + SPDLOG_WARN("prepared batch_orderbook is empty, nothing to do"); return; + } auto answer_functor = [this, is_a_reset](web::http::http_response resp) { @@ -1814,7 +1825,7 @@ namespace atomic_dex } auto&& [base, rel] = m_synchronized_ticker_pair.get(); - auto base_max_taker_vol_answer = mm2::rpc_process_answer_batch(answer[1], "max_taker_vol"); + auto base_max_taker_vol_answer = mm2::rpc_process_answer_batch(answer[0], "max_taker_vol"); if (base_max_taker_vol_answer.rpc_result_code == 200) { if (base == base_max_taker_vol_answer.result->coin) @@ -1823,7 +1834,7 @@ namespace atomic_dex } } - auto rel_max_taker_vol_answer = mm2::rpc_process_answer_batch(answer[2], "max_taker_vol"); + auto rel_max_taker_vol_answer = mm2::rpc_process_answer_batch(answer[1], "max_taker_vol"); if (rel_max_taker_vol_answer.rpc_result_code == 200) { if (rel == rel_max_taker_vol_answer.result->coin) @@ -1832,23 +1843,21 @@ namespace atomic_dex } } - auto base_min_taker_vol_answer = mm2::rpc_process_answer_batch(answer[3], "min_trading_vol"); + auto base_min_taker_vol_answer = mm2::rpc_process_answer_batch(answer[2], "min_trading_vol"); if (base_min_taker_vol_answer.rpc_result_code == 200) { m_synchronized_min_taker_vol->first = base_min_taker_vol_answer.result.value(); } - auto rel_min_taker_vol_answer = mm2::rpc_process_answer_batch(answer[4], "min_trading_vol"); + auto rel_min_taker_vol_answer = mm2::rpc_process_answer_batch(answer[3], "min_trading_vol"); if (rel_min_taker_vol_answer.rpc_result_code == 200) { m_synchronized_min_taker_vol->second = rel_min_taker_vol_answer.result.value(); } } - } }; - m_mm2_client.async_rpc_batch_standalone(batch) .then(answer_functor) .then([this, batch](pplx::task previous_task) { this->handle_exception_pplx_task(previous_task, "process_orderbook_extras", batch); }); @@ -2312,9 +2321,7 @@ namespace atomic_dex void mm2_service::on_refresh_orderbook(const orderbook_refresh& evt) { - SPDLOG_DEBUG("on_refresh_orderbook"); - - // SPDLOG_INFO("refreshing orderbook pair: [{} / {}]", evt.base, evt.rel); + // SPDLOG_DEBUG("refreshing orderbook pair: [{} / {}]", evt.base, evt.rel); this->m_synchronized_ticker_pair = std::make_pair(evt.base, evt.rel); if (this->m_mm2_running) diff --git a/src/core/atomicdex/services/mm2/mm2.service.hpp b/src/core/atomicdex/services/mm2/mm2.service.hpp index b7d2ced830..5159c632fd 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.hpp +++ b/src/core/atomicdex/services/mm2/mm2.service.hpp @@ -117,7 +117,8 @@ namespace atomic_dex double m_balance_factor{1.0}; //! Refresh the orderbook registry (internal) - nlohmann::json prepare_batch_orderbook(bool is_a_reset); + void prepare_orderbook(bool is_a_reset); + void process_orderbook_extras(nlohmann::json batch, bool is_a_reset); //! Batch balance / tx std::tuple, std::vector> prepare_batch_balance_and_tx(bool only_tx = false) const; diff --git a/src/core/atomicdex/utilities/global.utilities.cpp b/src/core/atomicdex/utilities/global.utilities.cpp index f11d804164..0f906fcfe6 100644 --- a/src/core/atomicdex/utilities/global.utilities.cpp +++ b/src/core/atomicdex/utilities/global.utilities.cpp @@ -306,4 +306,12 @@ namespace atomic_dex::utils } return valid_json_data; } + + void json_keys(nlohmann::json j) + { + for (auto& [key, val] : j.items()) + { + SPDLOG_DEBUG("key: {}, value: {}", key, val); + } + } } // namespace atomic_dex::utils diff --git a/src/core/atomicdex/utilities/global.utilities.hpp b/src/core/atomicdex/utilities/global.utilities.hpp index 4fbcd1fc2e..90eeace9b8 100644 --- a/src/core/atomicdex/utilities/global.utilities.hpp +++ b/src/core/atomicdex/utilities/global.utilities.hpp @@ -97,6 +97,7 @@ namespace atomic_dex::utils std::string retrieve_main_ticker(const std::string& ticker, const bool segwit_only = false); void to_eth_checksum(std::string& address); + void json_keys(nlohmann::json j); std::vector coin_cfg_to_ticker_cfg(std::vector in); From 2c09414a7a4211f38f320ea3766ad79dfe68ca92 Mon Sep 17 00:00:00 2001 From: smk762 Date: Sun, 17 Dec 2023 16:45:45 +0800 Subject: [PATCH 05/43] make bestorders async --- src/CMakeLists.txt | 4 +- ...{format.address.cpp => address_format.cpp} | 22 ++++- ...{format.address.hpp => address_format.hpp} | 10 +- .../{balance.infos.cpp => balance_infos.cpp} | 2 +- .../{balance.infos.hpp => balance_infos.hpp} | 0 src/core/atomicdex/api/mm2/generics.cpp | 3 +- src/core/atomicdex/api/mm2/mm2.client.cpp | 5 +- src/core/atomicdex/api/mm2/mm2.cpp | 3 +- src/core/atomicdex/api/mm2/paging_options.cpp | 2 +- src/core/atomicdex/api/mm2/paging_options.hpp | 4 +- src/core/atomicdex/api/mm2/rpc.tx.history.hpp | 6 +- .../atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp | 3 +- ...c2.best.orders.cpp => rpc2.bestorders.cpp} | 24 ++--- ...c2.best.orders.hpp => rpc2.bestorders.hpp} | 53 ++++++----- .../rpc2.enable_bch_with_tokens_rpc.cpp | 6 +- .../rpc2.enable_bch_with_tokens_rpc.hpp | 9 +- .../api/mm2/rpc_v2/rpc2.my_tx_history.hpp | 6 +- .../atomicdex/config/raw.mm2.coins.cfg.hpp | 94 +++++++------------ .../atomicdex/models/qt.orderbook.model.cpp | 4 +- .../atomicdex/models/qt.orderbook.model.hpp | 2 +- src/core/atomicdex/pages/qt.trading.page.cpp | 14 ++- .../pages/widgets/dex/qt.orderbook.cpp | 15 +-- .../pages/widgets/dex/qt.orderbook.hpp | 2 +- .../atomicdex/services/mm2/mm2.service.cpp | 15 +-- .../atomicdex/services/mm2/mm2.service.hpp | 2 +- .../price/orderbook.scanner.service.cpp | 77 +++++++-------- .../price/orderbook.scanner.service.hpp | 5 +- .../mm2/enable_bch_with_tokens_rpc_tests.cpp | 2 +- ...s.cpp => mm2.api.address_format.tests.cpp} | 6 +- ...ts.cpp => mm2.api.balance_infos.tests.cpp} | 2 +- 30 files changed, 192 insertions(+), 210 deletions(-) rename src/core/atomicdex/api/mm2/{format.address.cpp => address_format.cpp} (72%) rename src/core/atomicdex/api/mm2/{format.address.hpp => address_format.hpp} (83%) rename src/core/atomicdex/api/mm2/{balance.infos.cpp => balance_infos.cpp} (98%) rename src/core/atomicdex/api/mm2/{balance.infos.hpp => balance_infos.hpp} (100%) rename src/core/atomicdex/api/mm2/rpc_v2/{rpc2.best.orders.cpp => rpc2.bestorders.cpp} (77%) rename src/core/atomicdex/api/mm2/rpc_v2/{rpc2.best.orders.hpp => rpc2.bestorders.hpp} (56%) rename src/tests/api/mm2/{mm2.api.format.address.tests.cpp => mm2.api.address_format.tests.cpp} (89%) rename src/tests/api/mm2/{mm2.api.balance.infos.tests.cpp => mm2.api.balance_infos.tests.cpp} (97%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0bbc1a0a12..d155a3fcb9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -113,9 +113,9 @@ add_executable(${PROJECT_NAME}_tests MACOSX_BUNDLE ${ICON} ##! API tests/api/coingecko/coingecko.tests.cpp tests/api/komodo_prices/komodo.prices.tests.cpp - tests/api/mm2/mm2.api.format.address.tests.cpp + tests/api/mm2/mm2.api.address_format.tests.cpp tests/api/mm2/mm2.api.utxo.merge.params.tests.cpp - tests/api/mm2/mm2.api.balance.infos.tests.cpp + tests/api/mm2/mm2.api.balance_infos.tests.cpp tests/api/mm2/mm2.fraction.tests.cpp tests/api/mm2/mm2.rpc2.trade_preimage.tests.cpp diff --git a/src/core/atomicdex/api/mm2/format.address.cpp b/src/core/atomicdex/api/mm2/address_format.cpp similarity index 72% rename from src/core/atomicdex/api/mm2/format.address.cpp rename to src/core/atomicdex/api/mm2/address_format.cpp index e860019e11..a8ad2c7217 100644 --- a/src/core/atomicdex/api/mm2/format.address.cpp +++ b/src/core/atomicdex/api/mm2/address_format.cpp @@ -18,14 +18,28 @@ #include //! Project Headers -#include "format.address.hpp" +#include "atomicdex/api/mm2/address_format.hpp" namespace atomic_dex::mm2 { void - to_json(nlohmann::json& j, const format_address& cfg) + to_json(nlohmann::json& j, const address_format_t& req) { - j["format"] = cfg.format; - j["network"] = cfg.network; + j["format"] = req.format; + if (req.network.has_value()) + { + j["network"] = req.network.value(); + } + } + + void + from_json(const nlohmann::json& j, address_format_t& resp) + { + resp.format = j.at("format").get(); + if (j.contains("network")) + { + resp.network = j.at("network").get(); + } + } } // namespace atomic_dex::mm2 \ No newline at end of file diff --git a/src/core/atomicdex/api/mm2/format.address.hpp b/src/core/atomicdex/api/mm2/address_format.hpp similarity index 83% rename from src/core/atomicdex/api/mm2/format.address.hpp rename to src/core/atomicdex/api/mm2/address_format.hpp index c6f9db230c..ca0d16037b 100644 --- a/src/core/atomicdex/api/mm2/format.address.hpp +++ b/src/core/atomicdex/api/mm2/address_format.hpp @@ -21,11 +21,11 @@ namespace atomic_dex::mm2 { - struct format_address + struct address_format_t { - std::string format; - std::string network; + std::string format; + std::optional network{std::nullopt}; }; - - void to_json(nlohmann::json& j, const format_address& cfg); + void to_json(nlohmann::json& j, const address_format_t& cfg); + void from_json(const nlohmann::json& j, address_format_t& cfg); } \ No newline at end of file diff --git a/src/core/atomicdex/api/mm2/balance.infos.cpp b/src/core/atomicdex/api/mm2/balance_infos.cpp similarity index 98% rename from src/core/atomicdex/api/mm2/balance.infos.cpp rename to src/core/atomicdex/api/mm2/balance_infos.cpp index 73c1c8753c..1c2e6d3274 100644 --- a/src/core/atomicdex/api/mm2/balance.infos.cpp +++ b/src/core/atomicdex/api/mm2/balance_infos.cpp @@ -18,7 +18,7 @@ #include // Project Headers -#include "balance.infos.hpp" +#include "balance_infos.hpp" namespace atomic_dex::mm2 { diff --git a/src/core/atomicdex/api/mm2/balance.infos.hpp b/src/core/atomicdex/api/mm2/balance_infos.hpp similarity index 100% rename from src/core/atomicdex/api/mm2/balance.infos.hpp rename to src/core/atomicdex/api/mm2/balance_infos.hpp diff --git a/src/core/atomicdex/api/mm2/generics.cpp b/src/core/atomicdex/api/mm2/generics.cpp index 19e4288df0..9c64cb71c0 100644 --- a/src/core/atomicdex/api/mm2/generics.cpp +++ b/src/core/atomicdex/api/mm2/generics.cpp @@ -27,7 +27,7 @@ #include "atomicdex/api/mm2/rpc_v1/rpc.recover_funds_of_swap.hpp" #include "atomicdex/api/mm2/rpc_v1/rpc.sell.hpp" #include "atomicdex/api/mm2/rpc_v1/rpc.validateaddress.hpp" -#include "atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.hpp" namespace atomic_dex::mm2 @@ -51,7 +51,6 @@ namespace atomic_dex::mm2 template void extract_rpc_json_answer(const nlohmann::json& j, min_volume_answer& answer); template void extract_rpc_json_answer(const nlohmann::json& j, buy_answer& answer); template void extract_rpc_json_answer(const nlohmann::json& j, sell_answer& answer); - template void extract_rpc_json_answer(const nlohmann::json& j, best_orders_answer& answer); template void extract_rpc_json_answer(const nlohmann::json& j, disable_coin_answer& answer); template void extract_rpc_json_answer(const nlohmann::json& j, validate_address_answer& answer); template void extract_rpc_json_answer(const nlohmann::json& j, convert_address_answer& answer); diff --git a/src/core/atomicdex/api/mm2/mm2.client.cpp b/src/core/atomicdex/api/mm2/mm2.client.cpp index eb4e263a01..411e5e40ba 100644 --- a/src/core/atomicdex/api/mm2/mm2.client.cpp +++ b/src/core/atomicdex/api/mm2/mm2.client.cpp @@ -27,6 +27,7 @@ #include "atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp" @@ -161,6 +162,9 @@ namespace atomic_dex::mm2 using request_type = typename Rpc::expected_request_type; process_rpc_async(request_type{}, on_rpc_processed); } + + template void mm2_client::process_rpc_async(const std::function&); + template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); @@ -168,7 +172,6 @@ namespace atomic_dex::mm2 template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); - template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(typename Rpc::expected_request_type request, const std::function& on_rpc_processed) diff --git a/src/core/atomicdex/api/mm2/mm2.cpp b/src/core/atomicdex/api/mm2/mm2.cpp index 53761b93e0..ccaa9e2c55 100644 --- a/src/core/atomicdex/api/mm2/mm2.cpp +++ b/src/core/atomicdex/api/mm2/mm2.cpp @@ -23,7 +23,7 @@ #include "atomicdex/api/mm2/rpc_v1/rpc.min_trading_vol.hpp" #include "atomicdex/api/mm2/rpc_v1/rpc.recover_funds_of_swap.hpp" #include "atomicdex/api/mm2/rpc_v1/rpc.validateaddress.hpp" -#include "atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.status.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.hpp" @@ -717,7 +717,6 @@ namespace atomic_dex::mm2 template mm2::active_swaps_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); template mm2::show_priv_key_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); template mm2::trade_preimage_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); - template mm2::best_orders_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); template mm2::validate_address_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); template mm2::convert_address_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); template mm2::recover_funds_of_swap_answer rpc_process_answer_batch(nlohmann::json& json_answer, const std::string& rpc_command); diff --git a/src/core/atomicdex/api/mm2/paging_options.cpp b/src/core/atomicdex/api/mm2/paging_options.cpp index 95943a77ec..2d785b004c 100644 --- a/src/core/atomicdex/api/mm2/paging_options.cpp +++ b/src/core/atomicdex/api/mm2/paging_options.cpp @@ -7,7 +7,7 @@ namespace atomic_dex::mm2 { - void to_json(nlohmann::json& j, const paging_options& in) + void to_json(nlohmann::json& j, const paging_options_t& in) { if (in.from_id) { diff --git a/src/core/atomicdex/api/mm2/paging_options.hpp b/src/core/atomicdex/api/mm2/paging_options.hpp index 4f48ec69db..851ce650f7 100644 --- a/src/core/atomicdex/api/mm2/paging_options.hpp +++ b/src/core/atomicdex/api/mm2/paging_options.hpp @@ -9,11 +9,11 @@ namespace atomic_dex::mm2 { - struct paging_options + struct paging_options_t { std::optional from_id; std::optional page_number; }; - void to_json(nlohmann::json& j, const paging_options& in); + void to_json(nlohmann::json& j, const paging_options_t& in); } \ No newline at end of file diff --git a/src/core/atomicdex/api/mm2/rpc.tx.history.hpp b/src/core/atomicdex/api/mm2/rpc.tx.history.hpp index 900290bead..a761b2d954 100644 --- a/src/core/atomicdex/api/mm2/rpc.tx.history.hpp +++ b/src/core/atomicdex/api/mm2/rpc.tx.history.hpp @@ -12,9 +12,9 @@ namespace atomic_dex::mm2 { struct tx_history_request { - std::string coin; - std::size_t limit; - std::optional paging_options; + std::string coin; + std::size_t limit; + std::optional paging_options; }; void to_json(nlohmann::json& j, const tx_history_request& cfg); diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp index 86dc73d6ac..0cbfcff2d7 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp @@ -22,6 +22,7 @@ //! Project Headers #include "atomicdex/config/electrum.cfg.hpp" #include "atomicdex/constants/qt.coins.enums.hpp" +#include "atomicdex/api/mm2/address_format.hpp" namespace atomic_dex::mm2 { @@ -34,7 +35,7 @@ namespace atomic_dex::mm2 bool with_tx_history{true}; std::optional swap_contract_address{std::nullopt}; std::optional fallback_swap_contract_address{std::nullopt}; - std::optional address_format; + std::optional address_format; std::optional merge_params; std::optional> bchd_urls; std::optional allow_slp_unsafe_conf; diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.best.orders.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.cpp similarity index 77% rename from src/core/atomicdex/api/mm2/rpc_v2/rpc2.best.orders.cpp rename to src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.cpp index ebab6c03bd..c13786254b 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.best.orders.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.cpp @@ -23,23 +23,22 @@ //! Project Headers #include "atomicdex/api/mm2/generics.hpp" -#include "atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp" //! Implementation RPC [best_orders] namespace atomic_dex::mm2 { void - to_json(nlohmann::json& j, const best_orders_request& req) + to_json(nlohmann::json& j, const bestorders_request_rpc& req) { - SPDLOG_INFO("getting bestorders data..."); - j["params"]["coin"] = req.coin; - j["params"]["action"] = req.action; - j["params"]["request_by"]["type"] = "volume"; - j["params"]["request_by"]["value"] = req.volume; + j["coin"] = req.coin; + j["action"] = req.action; + j["request_by"]["type"] = "volume"; + j["request_by"]["value"] = req.volume; } void - from_json(const nlohmann::json& j, best_orders_answer_success& answer) + from_json(const nlohmann::json& j, bestorders_result_rpc& resp) { if (j.empty()) { @@ -59,7 +58,7 @@ namespace atomic_dex::mm2 from_json(cur_order, contents); if (uuid_visited.emplace(contents.uuid).second) { - answer.result.emplace_back(std::move(contents)); + resp.result.emplace_back(std::move(contents)); } else { @@ -69,11 +68,4 @@ namespace atomic_dex::mm2 } } } - - void - from_json(const nlohmann::json& j, best_orders_answer& answer) - { - extract_rpc_json_answer(j, answer); - } - } // namespace atomic_dex::mm2 diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp similarity index 56% rename from src/core/atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp rename to src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp index a89e0729ee..eae52fead5 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp @@ -18,45 +18,48 @@ //! STD #include +#include //! Deps #include //! Project Headers +#include "atomicdex/api/mm2/rpc.hpp" #include "atomicdex/api/mm2/orderbook.order.contents.hpp" namespace atomic_dex::mm2 { - struct best_orders_request + struct bestorders_rpc { - std::string coin; - std::string volume; - std::string action; - }; + static constexpr auto endpoint = "best_orders"; + static constexpr bool is_v2 = true; - void to_json(nlohmann::json& j, const best_orders_request& req); + struct expected_request_type + { + std::string coin; + std::string volume; + std::string action; + }; - struct best_orders_answer_success - { - std::vector result; - }; - void from_json(const nlohmann::json& j, best_orders_answer_success& answer); + struct expected_result_type + { + std::vector result; + }; - struct best_orders_answer - { - std::optional result; - std::optional error; - std::string raw_result; ///< internal - int rpc_result_code; ///< internal + using expected_error_type = rpc_basic_error_type; + + expected_request_type request; + std::optional result; + std::optional error; + std::string raw_result; }; - void from_json(const nlohmann::json& j, best_orders_answer& answer); -} // namespace atomic_dex::mm2 + using bestorders_request_rpc = bestorders_rpc::expected_request_type; + using bestorders_result_rpc = bestorders_rpc::expected_result_type; + using bestorders_error_rpc = bestorders_rpc::expected_error_type; -namespace atomic_dex -{ - using t_best_orders_request = mm2::best_orders_request; - using t_best_orders_answer = mm2::best_orders_answer; - using t_best_orders_answer_success = mm2::best_orders_answer_success; -} // namespace atomic_dex \ No newline at end of file + void to_json(nlohmann::json& j, const bestorders_request_rpc& req); + void from_json(const nlohmann::json& j, bestorders_result_rpc& answer); + +} // namespace atomic_dex::mm2 diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp index 1cee8922d5..e5eb5f9060 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp @@ -1,5 +1,6 @@ #include +#include "atomicdex/api/mm2/address_format.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp" namespace atomic_dex::mm2 @@ -33,11 +34,6 @@ namespace atomic_dex::mm2 j["servers"] = in.servers; } - void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::address_format_t& in) - { - j["format"] = in.format; - j["network"] = in.network; - } void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::slp_token_request_t& in) { diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp index dd0d0b31d6..7f32a393f8 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp @@ -21,6 +21,7 @@ #include "atomicdex/api/mm2/rpc.hpp" #include "atomicdex/api/mm2/balance_info.hpp" #include "atomicdex/config/electrum.cfg.hpp" +#include "atomicdex/api/mm2/address_format.hpp" namespace atomic_dex::mm2 { @@ -43,11 +44,7 @@ namespace atomic_dex::mm2 std::string ticker; std::optional required_confirmations; }; - struct address_format_t - { - std::string format; - std::string network; - }; + struct utxo_merge_params_t { int merge_at; @@ -103,7 +100,7 @@ namespace atomic_dex::mm2 void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc& in); void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::mode_t& in); void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::mode_t::data& in); - void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::address_format_t& in); + void to_json(nlohmann::json& j, const address_format_t& in); void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::slp_token_request_t& in); void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::utxo_merge_params_t& in); void from_json(const nlohmann::json& json, enable_bch_with_tokens_result_rpc& out); diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp index 71d7c2ff0d..fd7089ae59 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.my_tx_history.hpp @@ -18,9 +18,9 @@ namespace atomic_dex::mm2 struct expected_request_type { - std::string coin; - int limit; - paging_options paging_options; + std::string coin; + int limit; + paging_options_t paging_options; }; struct expected_result_type diff --git a/src/core/atomicdex/config/raw.mm2.coins.cfg.hpp b/src/core/atomicdex/config/raw.mm2.coins.cfg.hpp index 3f291ed49f..503a99828c 100644 --- a/src/core/atomicdex/config/raw.mm2.coins.cfg.hpp +++ b/src/core/atomicdex/config/raw.mm2.coins.cfg.hpp @@ -12,6 +12,7 @@ #include "atomicdex/api/mm2/mm2.constants.hpp" #include "atomicdex/utilities/global.utilities.hpp" #include "atomicdex/utilities/qt.utilities.hpp" +#include "atomicdex/api/mm2/address_format.hpp" #ifndef NLOHMANN_OPT_HELPER # define NLOHMANN_OPT_HELPER @@ -76,46 +77,42 @@ namespace atomic_dex return get_optional(j, property.data()); } - struct address_format - { - std::string format; - std::optional network{std::nullopt}; - }; struct coin_element { - std::string coin; - std::optional name{std::nullopt}; - std::optional fname{std::nullopt}; - std::optional etomic{std::nullopt}; - std::optional chain_id{std::nullopt}; - std::optional rpcport{std::nullopt}; - std::optional pubtype{std::nullopt}; - std::optional p2_shtype{std::nullopt}; - std::optional wiftype{std::nullopt}; - std::optional txfee{std::nullopt}; - std::optional confpath{std::nullopt}; - std::optional mm2{std::nullopt}; - std::optional required_confirmations{std::nullopt}; - std::optional asset{std::nullopt}; - std::optional txversion{std::nullopt}; - std::optional overwintered{std::nullopt}; - std::optional requires_notarization{std::nullopt}; - std::optional is_po_s{std::nullopt}; - std::optional segwit{std::nullopt}; - std::optional address_format{std::nullopt}; - std::optional estimate_fee_mode{std::nullopt}; - std::optional taddr{std::nullopt}; - std::optional decimals{std::nullopt}; - std::optional force_min_relay_fee{std::nullopt}; - std::optional p2_p{std::nullopt}; - std::optional magic{std::nullopt}; - std::optional n_spv{std::nullopt}; - std::optional version_group_id{std::nullopt}; - std::optional consensus_branch_id{std::nullopt}; - std::optional avg_blocktime{std::nullopt}; - std::optional dust{std::nullopt}; - nlohmann::json protocol; + using addr_fmt = mm2::address_format_t; + std::string coin; + std::optional name{std::nullopt}; + std::optional fname{std::nullopt}; + std::optional etomic{std::nullopt}; + std::optional chain_id{std::nullopt}; + std::optional rpcport{std::nullopt}; + std::optional pubtype{std::nullopt}; + std::optional p2_shtype{std::nullopt}; + std::optional wiftype{std::nullopt}; + std::optional txfee{std::nullopt}; + std::optional confpath{std::nullopt}; + std::optional mm2{std::nullopt}; + std::optional required_confirmations{std::nullopt}; + std::optional asset{std::nullopt}; + std::optional txversion{std::nullopt}; + std::optional overwintered{std::nullopt}; + std::optional requires_notarization{std::nullopt}; + std::optional is_po_s{std::nullopt}; + std::optional segwit{std::nullopt}; + std::optional address_format{std::nullopt}; + std::optional estimate_fee_mode{std::nullopt}; + std::optional taddr{std::nullopt}; + std::optional decimals{std::nullopt}; + std::optional force_min_relay_fee{std::nullopt}; + std::optional p2_p{std::nullopt}; + std::optional magic{std::nullopt}; + std::optional n_spv{std::nullopt}; + std::optional version_group_id{std::nullopt}; + std::optional consensus_branch_id{std::nullopt}; + std::optional avg_blocktime{std::nullopt}; + std::optional dust{std::nullopt}; + nlohmann::json protocol; }; using coins = std::vector; @@ -129,30 +126,9 @@ namespace atomic_dex namespace atomic_dex { - void from_json(const json& j, atomic_dex::address_format& x); - void to_json(json& j, const atomic_dex::address_format& x); - void from_json(const json& j, atomic_dex::coin_element& x); void to_json(json& j, const atomic_dex::coin_element& x); - inline void - from_json(const json& j, atomic_dex::address_format& x) - { - x.format = j.at("format").get(); - x.network = atomic_dex::get_optional(j, "network"); - } - - inline void - to_json(json& j, const atomic_dex::address_format& x) - { - j = json::object(); - j["format"] = x.format; - if (x.network.has_value()) - { - j["network"] = x.network.value(); - } - } - inline void from_json(const json& j, atomic_dex::coin_element& x) { @@ -175,7 +151,7 @@ namespace atomic_dex x.requires_notarization = atomic_dex::get_optional(j, "requires_notarization"); x.is_po_s = atomic_dex::get_optional(j, "isPoS"); x.segwit = atomic_dex::get_optional(j, "segwit"); - x.address_format = atomic_dex::get_optional(j, "address_format"); + x.address_format = atomic_dex::get_optional(j, "address_format"); x.estimate_fee_mode = atomic_dex::get_optional(j, "estimate_fee_mode"); x.taddr = atomic_dex::get_optional(j, "taddr"); x.decimals = atomic_dex::get_optional(j, "decimals"); diff --git a/src/core/atomicdex/models/qt.orderbook.model.cpp b/src/core/atomicdex/models/qt.orderbook.model.cpp index 672650894d..95afb9fc9a 100644 --- a/src/core/atomicdex/models/qt.orderbook.model.cpp +++ b/src/core/atomicdex/models/qt.orderbook.model.cpp @@ -522,9 +522,9 @@ namespace atomic_dex } void - orderbook_model::refresh_orderbook(const t_orders_contents& orderbook, bool is_bestorders) + orderbook_model::refresh_orderbook_model_data(const t_orders_contents& orderbook, bool is_bestorders) { - SPDLOG_DEBUG("[orderbook_model::refresh_orderbook], is_bestorders: {}", is_bestorders); + SPDLOG_DEBUG("[orderbook_model::refresh_orderbook_model_data], is_bestorders: {}", is_bestorders); auto refresh_functor = [this](const std::vector& contents) { for (auto&& order: contents) diff --git a/src/core/atomicdex/models/qt.orderbook.model.hpp b/src/core/atomicdex/models/qt.orderbook.model.hpp index 269c58a971..30b8e37004 100644 --- a/src/core/atomicdex/models/qt.orderbook.model.hpp +++ b/src/core/atomicdex/models/qt.orderbook.model.hpp @@ -89,7 +89,7 @@ namespace atomic_dex bool removeRows(int row, int count, const QModelIndex& parent) override; void reset_orderbook(const t_orders_contents& orderbook, bool is_bestorders=false); - void refresh_orderbook(const t_orders_contents& orderbook, bool is_bestorders=false); + void refresh_orderbook_model_data(const t_orders_contents& orderbook, bool is_bestorders=false); void clear_orderbook(); [[nodiscard]] int get_length() const; [[nodiscard]] orderbook_proxy_model* get_orderbook_proxy() const; diff --git a/src/core/atomicdex/pages/qt.trading.page.cpp b/src/core/atomicdex/pages/qt.trading.page.cpp index 741ad945a5..bf47207d36 100644 --- a/src/core/atomicdex/pages/qt.trading.page.cpp +++ b/src/core/atomicdex/pages/qt.trading.page.cpp @@ -489,9 +489,10 @@ namespace atomic_dex if (!ec) { - // SPDLOG_DEBUG("[process_action::post_process_orderbook_finished]"); + SPDLOG_DEBUG("[process_action::post_process_orderbook_finished] Needs reset: {}", m_models_actions[orderbook_need_a_reset]); + SPDLOG_DEBUG(">>>> triggers: {}", m_models_actions[orderbook_need_a_reset] ? "reset_orderbook" : "refresh_orderbook_model_data"); auto* wrapper = get_orderbook_wrapper(); - m_models_actions[orderbook_need_a_reset] ? wrapper->reset_orderbook(result) : wrapper->refresh_orderbook(result); + m_models_actions[orderbook_need_a_reset] ? wrapper->reset_orderbook(result) : wrapper->refresh_orderbook_model_data(result); if (m_models_actions[orderbook_need_a_reset] && this->m_current_trading_mode == TradingModeGadget::Pro) { @@ -814,6 +815,7 @@ namespace atomic_dex //! Capping it this->cap_volume(); + SPDLOG_WARN("max_taker_vol this->cap_volume()"); } else { @@ -862,6 +864,7 @@ namespace atomic_dex } } this->cap_volume(); + SPDLOG_WARN("max_taker_vol this->cap_volume()"); } else { @@ -874,6 +877,7 @@ namespace atomic_dex } this->set_max_volume(QString::fromStdString(utils::format_float(res))); this->cap_volume(); + SPDLOG_WARN("max_taker_vol this->cap_volume()"); } } } @@ -886,10 +890,10 @@ namespace atomic_dex * cap_volume is called only in MarketMode::Buy, and in Sell mode if preferred order * if the current volume text field is > the new max_volume then set volume to max_volume */ - if (auto std_volume = this->get_volume().toStdString(); - !std_volume.empty() && safe_float(std_volume) > safe_float(this->get_max_volume().toStdString())) + auto max_volume = this->get_max_volume(); + auto std_volume = this->get_volume().toStdString(); + if (!std_volume.empty() && safe_float(std_volume) > safe_float(max_volume.toStdString())) { - auto max_volume = this->get_max_volume(); if (!max_volume.isEmpty() && max_volume != "0") { SPDLOG_DEBUG("capping volume because {} (volume) > {} (max_volume)", std_volume, max_volume.toStdString()); diff --git a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp index 461cd34a18..0a22ce1986 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp @@ -79,10 +79,11 @@ namespace atomic_dex } void - qt_orderbook_wrapper::refresh_orderbook(mm2::orderbook_result_rpc answer) + qt_orderbook_wrapper::refresh_orderbook_model_data(mm2::orderbook_result_rpc answer) { - this->m_asks->refresh_orderbook(answer.asks); - this->m_bids->refresh_orderbook(answer.bids); + SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] bids/asks size: {}/{}", answer.bids.size(), answer.asks.size()); + this->m_asks->refresh_orderbook_model_data(answer.asks); + this->m_bids->refresh_orderbook_model_data(answer.bids); const auto data = this->m_system_manager.get_system().get_bestorders_data(); if (data.empty()) { @@ -90,13 +91,13 @@ namespace atomic_dex } else if (m_best_orders->rowCount() == 0) { - // SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook] : reset_best_orders"); + SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] : reset_best_orders"); m_best_orders->reset_orderbook(data, true); } else { - // SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook] : refresh_best_orders"); - m_best_orders->refresh_orderbook(data, true); + SPDLOG_INFO("[qt_orderbook_wrapper::refresh_orderbook_model_data] : refresh_best_orders"); + m_best_orders->refresh_orderbook_model_data(data, true); } this->set_both_taker_vol(); } @@ -113,6 +114,7 @@ namespace atomic_dex m_system_manager.get_system().set_preferred_order(m_selected_best_order->value()); m_selected_best_order = std::nullopt; } + SPDLOG_INFO("m_best_orders->clear_orderbook()"); m_best_orders->clear_orderbook(); ///< Remove all elements from the model this->m_system_manager.get_system().process_best_orders(); ///< re process the model } @@ -172,6 +174,7 @@ namespace atomic_dex { if (safe_float(m_system_manager.get_system().get_volume().toStdString()) > 0) { + SPDLOG_INFO("qt_orderbook_wrapper::refresh_best_orders()"); this->m_system_manager.get_system().process_best_orders(); } else diff --git a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp index 606d0cb224..29d74e5afd 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp @@ -47,7 +47,7 @@ namespace atomic_dex public: void adjust_min_vol(); - void refresh_orderbook(mm2::orderbook_result_rpc answer); + void refresh_orderbook_model_data(mm2::orderbook_result_rpc answer); void reset_orderbook(mm2::orderbook_result_rpc answer); void clear_orderbook(); [[nodiscard]] orderbook_model* get_asks() const; diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index 8bd1feab90..f2e9773ebe 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -268,7 +268,7 @@ namespace atomic_dex m_info_clock = std::chrono::high_resolution_clock::now(); dispatcher_.sink().connect<&mm2_service::on_gui_enter_trading>(*this); dispatcher_.sink().connect<&mm2_service::on_gui_leave_trading>(*this); - dispatcher_.sink().connect<&mm2_service::on_refresh_orderbook>(*this); + dispatcher_.sink().connect<&mm2_service::on_refresh_orderbook_model_data>(*this); SPDLOG_INFO("mm2_service created"); } @@ -323,7 +323,7 @@ namespace atomic_dex SPDLOG_INFO("destroying mm2 service..."); dispatcher_.sink().disconnect<&mm2_service::on_gui_enter_trading>(*this); dispatcher_.sink().disconnect<&mm2_service::on_gui_leave_trading>(*this); - dispatcher_.sink().disconnect<&mm2_service::on_refresh_orderbook>(*this); + dispatcher_.sink().disconnect<&mm2_service::on_refresh_orderbook_model_data>(*this); SPDLOG_INFO("mm2 signals successfully disconnected"); bool mm2_stopped = false; if (m_mm2_running) @@ -1741,7 +1741,7 @@ namespace atomic_dex ec = dextop_error::orderbook_ticker_not_found; return {}; } - // SPDLOG_DEBUG("orderbook active: {}/{}", orderbook.base + "/" + orderbook.rel); + SPDLOG_DEBUG("orderbook active: {}/{}", orderbook.base + "/" + orderbook.rel); return orderbook; } @@ -1771,8 +1771,6 @@ namespace atomic_dex } else { - m_orderbook = rpc.result.value(); - this->dispatcher_.trigger(is_a_reset); if (is_a_reset) { nlohmann::json batch = nlohmann::json::array(); @@ -1783,6 +1781,9 @@ namespace atomic_dex batch.push_back(generate_req("min_trading_vol", t_min_volume_request{.coin = rel})); process_orderbook_extras(batch, is_a_reset); } + m_orderbook = rpc.result.value(); + SPDLOG_ERROR("Triggering [process_orderbook_finished]: {}", is_a_reset); + this->dispatcher_.trigger(is_a_reset); } }; @@ -2319,9 +2320,9 @@ namespace atomic_dex } void - mm2_service::on_refresh_orderbook(const orderbook_refresh& evt) + mm2_service::on_refresh_orderbook_model_data(const orderbook_refresh& evt) { - // SPDLOG_DEBUG("refreshing orderbook pair: [{} / {}]", evt.base, evt.rel); + SPDLOG_DEBUG("refreshing orderbook pair: [{} / {}]", evt.base, evt.rel); this->m_synchronized_ticker_pair = std::make_pair(evt.base, evt.rel); if (this->m_mm2_running) diff --git a/src/core/atomicdex/services/mm2/mm2.service.hpp b/src/core/atomicdex/services/mm2/mm2.service.hpp index 5159c632fd..79b4541161 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.hpp +++ b/src/core/atomicdex/services/mm2/mm2.service.hpp @@ -150,7 +150,7 @@ namespace atomic_dex ~mm2_service() final; //! Events - void on_refresh_orderbook(const orderbook_refresh& evt); + void on_refresh_orderbook_model_data(const orderbook_refresh& evt); void on_gui_enter_trading(const gui_enter_trading& evt); diff --git a/src/core/atomicdex/services/price/orderbook.scanner.service.cpp b/src/core/atomicdex/services/price/orderbook.scanner.service.cpp index 7c255fd748..dd02a5fdca 100644 --- a/src/core/atomicdex/services/price/orderbook.scanner.service.cpp +++ b/src/core/atomicdex/services/price/orderbook.scanner.service.cpp @@ -14,8 +14,9 @@ * * ******************************************************************************/ +#include //! Project Headers -#include "atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp" #include "atomicdex/pages/qt.trading.page.hpp" #include "atomicdex/services/mm2/mm2.service.hpp" #include "atomicdex/services/price/orderbook.scanner.service.hpp" @@ -40,7 +41,7 @@ namespace atomic_dex { if (m_bestorders_busy) { - // SPDLOG_INFO("process_best_orders is busy - skipping"); + SPDLOG_INFO("process_best_orders is busy - skipping"); return; } @@ -52,54 +53,45 @@ namespace atomic_dex { // SPDLOG_INFO("process_best_orders"); using namespace std::string_literals; - const auto& trading_pg = m_system_manager.get_system(); - auto volume = trading_pg.get_volume().toStdString(); - auto action = trading_pg.get_market_mode() == MarketMode::Buy ? "buy"s : "sell"s; - auto coin = trading_pg.get_market_pairs_mdl()->get_left_selected_coin().toStdString(); - t_best_orders_request req{.coin = std::move(coin), .volume = std::move(volume), .action = std::move(action)}; + using bestorders_req = mm2::bestorders_rpc::expected_request_type; + using bestorders_resp = mm2::bestorders_rpc::expected_result_type; + const auto& trading_pg = m_system_manager.get_system(); + auto volume = trading_pg.get_volume().toStdString(); + auto action = trading_pg.get_market_mode() == MarketMode::Buy ? "buy"s : "sell"s; + auto coin = trading_pg.get_market_pairs_mdl()->get_left_selected_coin().toStdString(); - //! Prepare request - nlohmann::json batch = nlohmann::json::array(); - nlohmann::json best_orders_req_json = mm2::template_request("best_orders", true); - to_json(best_orders_req_json, req); - batch.push_back(best_orders_req_json); + auto callback = [this, &trading_pg](RpcRequest rpc) + { + nlohmann::json batch = nlohmann::json::array(); + if (rpc.error) + { + SPDLOG_ERROR("error: bad answer json for process_best_orders: {}", rpc.error->error); + this->m_bestorders_busy = false; + SPDLOG_ERROR("Triggering [process_orderbook_finished]: true"); + this->dispatcher_.trigger(true); + } + else + { + if (rpc.result.has_value()) + { + this->m_best_orders_infos = rpc.result.value(); + } + this->m_bestorders_busy = false; + SPDLOG_ERROR("Triggering [process_orderbook_finished]: false"); + this->dispatcher_.trigger(false); + emit trading_pg.get_orderbook_wrapper()->bestOrdersBusyChanged(); + } + }; - // best_orders_req_json["userpass"] = "*****"; - // SPDLOG_INFO("best_orders request: {}", best_orders_req_json.dump(4)); this->m_bestorders_busy = true; emit trading_pg.get_orderbook_wrapper()->bestOrdersBusyChanged(); + mm2::bestorders_rpc rpc{.request={.coin = std::move(coin), .volume = std::move(volume), .action = std::move(action)}}; + mm2_system.get_mm2_client().process_rpc_async(rpc.request, callback); + //! Treat answer auto answer_functor = [this, &trading_pg](web::http::http_response resp) { - std::string body = TO_STD_STR(resp.extract_string(true).get()); - if (resp.status_code() == 200) - { - auto answers = nlohmann::json::parse(body); - auto best_order_answer = mm2::rpc_process_answer_batch(answers[0], "best_orders"); - if (best_order_answer.result.has_value()) - { - this->m_best_orders_infos = best_order_answer.result.value(); - } - } - this->m_bestorders_busy = false; - this->dispatcher_.trigger(false); - emit trading_pg.get_orderbook_wrapper()->bestOrdersBusyChanged(); }; - - mm2_system.get_mm2_client().async_rpc_batch_standalone(batch) - .then(answer_functor) - .then([this](pplx::task previous_task) { - try - { - previous_task.wait(); - } - catch (const std::exception& e) - { - SPDLOG_ERROR("pplx task error in [process_best_orders]: {}", e.what()); - this->m_bestorders_busy = false; - this->dispatcher_.trigger(true); - } - }); } else { @@ -126,6 +118,7 @@ namespace atomic_dex const auto s = std::chrono::duration_cast(now - m_update_clock); if (s >= 30s) { + SPDLOG_DEBUG("<<<<<<<<<<< orderbook_scanner_service update loop after 30 seconds >>>>>>>>>>>>>"); process_best_orders(); m_update_clock = std::chrono::high_resolution_clock::now(); } diff --git a/src/core/atomicdex/services/price/orderbook.scanner.service.hpp b/src/core/atomicdex/services/price/orderbook.scanner.service.hpp index 99bbcacb55..93555f4e36 100644 --- a/src/core/atomicdex/services/price/orderbook.scanner.service.hpp +++ b/src/core/atomicdex/services/price/orderbook.scanner.service.hpp @@ -22,7 +22,8 @@ #include //! Project Headers -#include "atomicdex/api/mm2/rpc_v2/rpc2.best.orders.hpp" +#include "atomicdex/api/mm2/mm2.client.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp" //! Namespace declaration namespace atomic_dex @@ -32,7 +33,7 @@ namespace atomic_dex { //! Private typedefs using t_update_time_point = std::chrono::high_resolution_clock::time_point; - using t_best_orders_synchronized = boost::synchronized_value; + using t_best_orders_synchronized = boost::synchronized_value; //! Private member fields ag::ecs::system_manager& m_system_manager; diff --git a/src/tests/api/mm2/enable_bch_with_tokens_rpc_tests.cpp b/src/tests/api/mm2/enable_bch_with_tokens_rpc_tests.cpp index 625c9e65bf..be1e9e13cc 100644 --- a/src/tests/api/mm2/enable_bch_with_tokens_rpc_tests.cpp +++ b/src/tests/api/mm2/enable_bch_with_tokens_rpc_tests.cpp @@ -24,7 +24,7 @@ TEST_CASE("enable_bch_with_tokens_request_rpc serialization") .slp_tokens_requests = { { .ticker = "ASLP", .required_confirmations = 4 } }, .required_confirmations = 5, .requires_notarization = false, - .address_format = enable_bch_with_tokens_request_rpc::address_format_t{ .format = "cashaddress", .network = "bitcoincash" }, + .address_format = address_format_t{ .format = "cashaddress", .network = "bitcoincash" }, .utxo_merge_params = enable_bch_with_tokens_request_rpc::utxo_merge_params_t{ .merge_at = 50, .check_every = 10, .max_merge_at_once = 25 } }; diff --git a/src/tests/api/mm2/mm2.api.format.address.tests.cpp b/src/tests/api/mm2/mm2.api.address_format.tests.cpp similarity index 89% rename from src/tests/api/mm2/mm2.api.format.address.tests.cpp rename to src/tests/api/mm2/mm2.api.address_format.tests.cpp index 0866934bad..116ecba165 100644 --- a/src/tests/api/mm2/mm2.api.format.address.tests.cpp +++ b/src/tests/api/mm2/mm2.api.address_format.tests.cpp @@ -18,7 +18,7 @@ #include "doctest/doctest.h" #include -#include "atomicdex/api/mm2/format.address.hpp" +#include "atomicdex/api/mm2/address_format.hpp" TEST_CASE("mm2::address_format serialisation") { @@ -28,9 +28,9 @@ TEST_CASE("mm2::address_format serialisation") "network":"bchtest" } )"_json; - atomic_dex::mm2::format_address request{.format = "cashaddress", .network = "bchtest"}; + atomic_dex::mm2::address_format_t req{.format = "cashaddress", .network = "bchtest"}; nlohmann::json j; - atomic_dex::mm2::to_json(j, request); + to_json(j, req); CHECK_EQ(j, expected_json); } \ No newline at end of file diff --git a/src/tests/api/mm2/mm2.api.balance.infos.tests.cpp b/src/tests/api/mm2/mm2.api.balance_infos.tests.cpp similarity index 97% rename from src/tests/api/mm2/mm2.api.balance.infos.tests.cpp rename to src/tests/api/mm2/mm2.api.balance_infos.tests.cpp index 358a240cdc..b298bbfb6f 100644 --- a/src/tests/api/mm2/mm2.api.balance.infos.tests.cpp +++ b/src/tests/api/mm2/mm2.api.balance_infos.tests.cpp @@ -18,7 +18,7 @@ #include "doctest/doctest.h" #include -#include "atomicdex/api/mm2/balance.infos.hpp" +#include "atomicdex/api/mm2/balance_infos.hpp" TEST_CASE("mm2::balance_infos deserialization") { From 5e241b2712ac763646b0c4790558008eca56b75c Mon Sep 17 00:00:00 2001 From: smk762 Date: Sun, 17 Dec 2023 17:07:47 +0800 Subject: [PATCH 06/43] refactor utx_merge_params --- .../rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp | 10 +--------- .../rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp | 13 +++---------- .../atomicdex/api/mm2/utxo.merge.params.cpp | 17 ++++++++++++----- .../atomicdex/api/mm2/utxo.merge.params.hpp | 4 ++-- src/core/atomicdex/config/coins.cfg.cpp | 4 ++-- src/core/atomicdex/config/coins.cfg.hpp | 2 +- src/core/atomicdex/services/mm2/mm2.service.cpp | 6 +++--- .../mm2/enable_bch_with_tokens_rpc_tests.cpp | 2 +- 8 files changed, 25 insertions(+), 33 deletions(-) diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp index e5eb5f9060..0727b2d1af 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.cpp @@ -33,21 +33,13 @@ namespace atomic_dex::mm2 { j["servers"] = in.servers; } - - + void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::slp_token_request_t& in) { j["ticker"] = in.ticker; if (in.required_confirmations) j["required_confirmations"] = in.required_confirmations.value(); } - - void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::utxo_merge_params_t& in) - { - j["merge_at"] = in.merge_at; - j["check_every"] = in.check_every; - j["max_merge_at_once"] = in.max_merge_at_once; - } void from_json(const nlohmann::json& json, enable_bch_with_tokens_result_rpc& out) { diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp index 7f32a393f8..5476fb6f3c 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp @@ -18,10 +18,11 @@ #include -#include "atomicdex/api/mm2/rpc.hpp" -#include "atomicdex/api/mm2/balance_info.hpp" #include "atomicdex/config/electrum.cfg.hpp" #include "atomicdex/api/mm2/address_format.hpp" +#include "atomicdex/api/mm2/balance_info.hpp" +#include "atomicdex/api/mm2/rpc.hpp" +#include "atomicdex/api/mm2/utxo.merge.params.hpp" namespace atomic_dex::mm2 { @@ -44,13 +45,6 @@ namespace atomic_dex::mm2 std::string ticker; std::optional required_confirmations; }; - - struct utxo_merge_params_t - { - int merge_at; - int check_every; - int max_merge_at_once; - }; std::string ticker; std::optional allow_slp_unsafe_conf{false}; @@ -102,7 +96,6 @@ namespace atomic_dex::mm2 void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::mode_t::data& in); void to_json(nlohmann::json& j, const address_format_t& in); void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::slp_token_request_t& in); - void to_json(nlohmann::json& j, const enable_bch_with_tokens_request_rpc::utxo_merge_params_t& in); void from_json(const nlohmann::json& json, enable_bch_with_tokens_result_rpc& out); void from_json(const nlohmann::json& json, enable_bch_with_tokens_result_rpc::derivation_method_t& out); void from_json(const nlohmann::json& json, enable_bch_with_tokens_result_rpc::bch_address_infos_t& out); diff --git a/src/core/atomicdex/api/mm2/utxo.merge.params.cpp b/src/core/atomicdex/api/mm2/utxo.merge.params.cpp index 040ec7f473..3a256ee81f 100644 --- a/src/core/atomicdex/api/mm2/utxo.merge.params.cpp +++ b/src/core/atomicdex/api/mm2/utxo.merge.params.cpp @@ -20,10 +20,17 @@ namespace atomic_dex::mm2 { - void to_json(nlohmann::json& j, const utxo_merge_params& cfg) + void to_json(nlohmann::json& j, const utxo_merge_params_t& req) { - j["merge_at"] = cfg.merge_at; - j["check_every"] = cfg.check_every; - j["max_merge_at_once"] = cfg.max_merge_at_once; + j["merge_at"] = req.merge_at; + j["check_every"] = req.check_every; + j["max_merge_at_once"] = req.max_merge_at_once; } -} \ No newline at end of file + void + from_json(const nlohmann::json& j, utxo_merge_params_t& resp) + { + resp.merge_at = j.at("merge_at").get(); + resp.check_every = j.at("check_every").get(); + resp.max_merge_at_once = j.at("max_merge_at_once").get(); + } +} diff --git a/src/core/atomicdex/api/mm2/utxo.merge.params.hpp b/src/core/atomicdex/api/mm2/utxo.merge.params.hpp index 5c74faaa15..cb6dd6f693 100644 --- a/src/core/atomicdex/api/mm2/utxo.merge.params.hpp +++ b/src/core/atomicdex/api/mm2/utxo.merge.params.hpp @@ -20,12 +20,12 @@ namespace atomic_dex::mm2 { - struct utxo_merge_params + struct utxo_merge_params_t { std::size_t merge_at; std::size_t check_every; std::size_t max_merge_at_once; }; - void to_json(nlohmann::json& j, const utxo_merge_params& cfg); + void to_json(nlohmann::json& j, const utxo_merge_params_t& cfg); } \ No newline at end of file diff --git a/src/core/atomicdex/config/coins.cfg.cpp b/src/core/atomicdex/config/coins.cfg.cpp index f428f7abc9..1ad7f9dbd0 100644 --- a/src/core/atomicdex/config/coins.cfg.cpp +++ b/src/core/atomicdex/config/coins.cfg.cpp @@ -180,9 +180,9 @@ namespace atomic_dex cfg.other_types = std::set(); for (const auto& other_type: other_types) { cfg.other_types->emplace(get_coin_type_from_str(other_type)); } } - if (j.contains("utxo_merge")) + if (j.contains("merge_utxos")) { - cfg.utxo_merge = j.at("utxo_merge"); + cfg.merge_utxos = j.at("merge_utxos"); } if (j.contains("mm2_backup")) { diff --git a/src/core/atomicdex/config/coins.cfg.hpp b/src/core/atomicdex/config/coins.cfg.hpp index b33e79ac7b..877f4f7817 100644 --- a/src/core/atomicdex/config/coins.cfg.hpp +++ b/src/core/atomicdex/config/coins.cfg.hpp @@ -73,7 +73,7 @@ namespace atomic_dex std::optional alias_ticker{std::nullopt}; std::optional allow_slp_unsafe_conf; std::optional is_testnet{false}; ///< True if testnet (tBTC, tQTUM, QRC-20 on testnet, tETH) - std::optional utxo_merge{false}; + std::optional merge_utxos{false}; std::optional swap_contract_address{std::nullopt}; std::optional fallback_swap_contract_address{std::nullopt}; std::optional gas_station_url{std::nullopt}; diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index f2e9773ebe..2c1c8639bb 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -778,10 +778,10 @@ namespace atomic_dex .is_testnet = coin_config.is_testnet.value_or(false), .with_tx_history = true }; - if (coin_config.utxo_merge.value_or(false)) + if (coin_config.merge_utxos.value_or(false)) { - mm2::utxo_merge_params merge_params{.merge_at = 250, .check_every = 300, .max_merge_at_once = 125}; - nlohmann::json json_merge_params; + mm2::utxo_merge_params_t merge_params{.merge_at = 250, .check_every = 300, .max_merge_at_once = 125}; + nlohmann::json json_merge_params; mm2::to_json(json_merge_params, merge_params); request.merge_params = json_merge_params; diff --git a/src/tests/api/mm2/enable_bch_with_tokens_rpc_tests.cpp b/src/tests/api/mm2/enable_bch_with_tokens_rpc_tests.cpp index be1e9e13cc..c8d6c738b0 100644 --- a/src/tests/api/mm2/enable_bch_with_tokens_rpc_tests.cpp +++ b/src/tests/api/mm2/enable_bch_with_tokens_rpc_tests.cpp @@ -25,7 +25,7 @@ TEST_CASE("enable_bch_with_tokens_request_rpc serialization") .required_confirmations = 5, .requires_notarization = false, .address_format = address_format_t{ .format = "cashaddress", .network = "bitcoincash" }, - .utxo_merge_params = enable_bch_with_tokens_request_rpc::utxo_merge_params_t{ .merge_at = 50, .check_every = 10, .max_merge_at_once = 25 } + .utxo_merge_params = utxo_merge_params_t{ .merge_at = 50, .check_every = 10, .max_merge_at_once = 25 } }; nlohmann::to_json(result, data); From 49cb99092f1b4a47a7214a4594d1913db5ff7af8 Mon Sep 17 00:00:00 2001 From: smk762 Date: Sun, 17 Dec 2023 18:10:32 +0800 Subject: [PATCH 07/43] clean up --- src/CMakeLists.txt | 2 +- .../api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp | 2 +- .../mm2/{utxo.merge.params.cpp => utxo_merge_params.cpp} | 2 +- .../mm2/{utxo.merge.params.hpp => utxo_merge_params.hpp} | 0 src/core/atomicdex/config/coins.cfg.hpp | 2 +- src/core/atomicdex/services/mm2/mm2.service.cpp | 2 +- .../atomicdex/services/price/orderbook.scanner.service.cpp | 6 ------ ...params.tests.cpp => mm2.api.utxo_merge_params.tests.cpp} | 4 ++-- 8 files changed, 7 insertions(+), 13 deletions(-) rename src/core/atomicdex/api/mm2/{utxo.merge.params.cpp => utxo_merge_params.cpp} (98%) rename src/core/atomicdex/api/mm2/{utxo.merge.params.hpp => utxo_merge_params.hpp} (100%) rename src/tests/api/mm2/{mm2.api.utxo.merge.params.tests.cpp => mm2.api.utxo_merge_params.tests.cpp} (90%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d155a3fcb9..f5d49ac68a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -114,7 +114,7 @@ add_executable(${PROJECT_NAME}_tests MACOSX_BUNDLE ${ICON} tests/api/coingecko/coingecko.tests.cpp tests/api/komodo_prices/komodo.prices.tests.cpp tests/api/mm2/mm2.api.address_format.tests.cpp - tests/api/mm2/mm2.api.utxo.merge.params.tests.cpp + tests/api/mm2/mm2.api.utxo_merge_params.tests.cpp tests/api/mm2/mm2.api.balance_infos.tests.cpp tests/api/mm2/mm2.fraction.tests.cpp tests/api/mm2/mm2.rpc2.trade_preimage.tests.cpp diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp index 5476fb6f3c..b9141b4933 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp @@ -22,7 +22,7 @@ #include "atomicdex/api/mm2/address_format.hpp" #include "atomicdex/api/mm2/balance_info.hpp" #include "atomicdex/api/mm2/rpc.hpp" -#include "atomicdex/api/mm2/utxo.merge.params.hpp" +#include "atomicdex/api/mm2/utxo_merge_params.hpp" namespace atomic_dex::mm2 { diff --git a/src/core/atomicdex/api/mm2/utxo.merge.params.cpp b/src/core/atomicdex/api/mm2/utxo_merge_params.cpp similarity index 98% rename from src/core/atomicdex/api/mm2/utxo.merge.params.cpp rename to src/core/atomicdex/api/mm2/utxo_merge_params.cpp index 3a256ee81f..8e01b1771a 100644 --- a/src/core/atomicdex/api/mm2/utxo.merge.params.cpp +++ b/src/core/atomicdex/api/mm2/utxo_merge_params.cpp @@ -16,7 +16,7 @@ #include -#include "utxo.merge.params.hpp" +#include "utxo_merge_params.hpp" namespace atomic_dex::mm2 { diff --git a/src/core/atomicdex/api/mm2/utxo.merge.params.hpp b/src/core/atomicdex/api/mm2/utxo_merge_params.hpp similarity index 100% rename from src/core/atomicdex/api/mm2/utxo.merge.params.hpp rename to src/core/atomicdex/api/mm2/utxo_merge_params.hpp diff --git a/src/core/atomicdex/config/coins.cfg.hpp b/src/core/atomicdex/config/coins.cfg.hpp index 877f4f7817..4da6ea5192 100644 --- a/src/core/atomicdex/config/coins.cfg.hpp +++ b/src/core/atomicdex/config/coins.cfg.hpp @@ -22,7 +22,7 @@ #include #include "atomicdex/api/mm2/mm2.constants.hpp" -#include "atomicdex/api/mm2/utxo.merge.params.hpp" +#include "atomicdex/api/mm2/utxo_merge_params.hpp" #include "atomicdex/config/electrum.cfg.hpp" #include "atomicdex/config/enable.cfg.hpp" #include "atomicdex/constants/qt.coins.enums.hpp" diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index 2c1c8639bb..6521d7d319 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -27,7 +27,7 @@ #include #include -#include "atomicdex/api/mm2/utxo.merge.params.hpp" +#include "atomicdex/api/mm2/utxo_merge_params.hpp" #include "atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp" #include "atomicdex/api/mm2/rpc_v1/rpc.enable.hpp" #include "atomicdex/api/mm2/rpc_v1/rpc.min_trading_vol.hpp" diff --git a/src/core/atomicdex/services/price/orderbook.scanner.service.cpp b/src/core/atomicdex/services/price/orderbook.scanner.service.cpp index dd02a5fdca..0909c4a9fe 100644 --- a/src/core/atomicdex/services/price/orderbook.scanner.service.cpp +++ b/src/core/atomicdex/services/price/orderbook.scanner.service.cpp @@ -53,8 +53,6 @@ namespace atomic_dex { // SPDLOG_INFO("process_best_orders"); using namespace std::string_literals; - using bestorders_req = mm2::bestorders_rpc::expected_request_type; - using bestorders_resp = mm2::bestorders_rpc::expected_result_type; const auto& trading_pg = m_system_manager.get_system(); auto volume = trading_pg.get_volume().toStdString(); auto action = trading_pg.get_market_mode() == MarketMode::Buy ? "buy"s : "sell"s; @@ -88,10 +86,6 @@ namespace atomic_dex emit trading_pg.get_orderbook_wrapper()->bestOrdersBusyChanged(); mm2::bestorders_rpc rpc{.request={.coin = std::move(coin), .volume = std::move(volume), .action = std::move(action)}}; mm2_system.get_mm2_client().process_rpc_async(rpc.request, callback); - - //! Treat answer - auto answer_functor = [this, &trading_pg](web::http::http_response resp) { - }; } else { diff --git a/src/tests/api/mm2/mm2.api.utxo.merge.params.tests.cpp b/src/tests/api/mm2/mm2.api.utxo_merge_params.tests.cpp similarity index 90% rename from src/tests/api/mm2/mm2.api.utxo.merge.params.tests.cpp rename to src/tests/api/mm2/mm2.api.utxo_merge_params.tests.cpp index 383a45183f..5f7e996c52 100644 --- a/src/tests/api/mm2/mm2.api.utxo.merge.params.tests.cpp +++ b/src/tests/api/mm2/mm2.api.utxo_merge_params.tests.cpp @@ -18,7 +18,7 @@ #include "doctest/doctest.h" #include -#include "atomicdex/api/mm2/utxo.merge.params.hpp" +#include "atomicdex/api/mm2/utxo_merge_params.hpp" TEST_CASE("mm2::utxo_merge_params serialisation") { @@ -29,7 +29,7 @@ TEST_CASE("mm2::utxo_merge_params serialisation") "max_merge_at_once":25 } )"_json; - atomic_dex::mm2::utxo_merge_params request{.merge_at = 50, .check_every = 10, .max_merge_at_once = 25}; + atomic_dex::mm2::utxo_merge_params_t request{.merge_at = 50, .check_every = 10, .max_merge_at_once = 25}; nlohmann::json j; atomic_dex::mm2::to_json(j, request); CHECK_EQ(j, expected_json); From 17691a9558cf9516f7648fb1ded9698cf8c98061 Mon Sep 17 00:00:00 2001 From: smk762 Date: Sun, 17 Dec 2023 19:19:52 +0800 Subject: [PATCH 08/43] adds peerid to settings > about --- .../Dex/Settings/SettingModal.qml | 24 +++- .../assets/languages/atomic_defi_de.ts | 121 ++++++++++-------- .../assets/languages/atomic_defi_en.ts | 121 ++++++++++-------- .../assets/languages/atomic_defi_es.ts | 121 ++++++++++-------- .../assets/languages/atomic_defi_fr.ts | 121 ++++++++++-------- .../assets/languages/atomic_defi_ru.ts | 121 ++++++++++-------- .../assets/languages/atomic_defi_tr.ts | 121 ++++++++++-------- src/core/atomicdex/api/mm2/mm2.cpp | 27 ++++ src/core/atomicdex/api/mm2/mm2.hpp | 1 + src/core/atomicdex/pages/qt.settings.page.cpp | 5 + src/core/atomicdex/pages/qt.settings.page.hpp | 1 + 11 files changed, 453 insertions(+), 331 deletions(-) diff --git a/atomic_defi_design/Dex/Settings/SettingModal.qml b/atomic_defi_design/Dex/Settings/SettingModal.qml index 45692cd07d..7dcb86d2b3 100644 --- a/atomic_defi_design/Dex/Settings/SettingModal.qml +++ b/atomic_defi_design/Dex/Settings/SettingModal.qml @@ -20,7 +20,6 @@ Qaterial.Dialog { id: setting_modal property alias selectedMenuIndex: menu_list.currentIndex - readonly property string mm2_version: API.app.settings_pg.get_mm2_version() property var recommended_fiats: API.app.settings_pg.get_recommended_fiats() property var fiats: API.app.settings_pg.get_available_fiats() property var enableable_coins_count: enableable_coins_count_combo_box.currentValue @@ -733,6 +732,29 @@ Qaterial.Dialog onCopyNotificationMsg: qsTr("Qt Version copied to clipboard.") } } + + RowLayout + { + width: parent.width - 30 + anchors.horizontalCenter: parent.horizontalCenter + height: 60 + + DexLabel + { + Layout.alignment: Qt.AlignVCenter + Layout.fillWidth: true + text: qsTr("Peer ID") + } + + DexCopyableLabel + { + Layout.alignment: Qt.AlignVCenter + text: API.app.settings_pg.get_peerid() + onCopyNotificationTitle: qsTr("Peer ID") + onCopyNotificationMsg: qsTr("Peer ID copied to clipboard.") + } + } + } } } diff --git a/atomic_defi_design/assets/languages/atomic_defi_de.ts b/atomic_defi_design/assets/languages/atomic_defi_de.ts index 2a7b4afc2f..c6777282d3 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_de.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_de.ts @@ -3415,252 +3415,263 @@ Bitte wählen Sie eine neue Order aus. SettingModal - - + + Cancel Abbrechen - + Settings Einstellungen - + General Allgemein - + Language Sprache - + User Interface Benutzeroberfläche - + Security Sicherheit - + Enable Desktop Notifications Desktop-Benachrichtigungen aktivieren - + Hide Poison Transactions in History - + Maximum number of enabled coins Maximale Anzahl aktivierter Coins - + Logs Protokolle - + Open Folder Ordner öffnen - + ZHTLC sync date - + use date sync - + Sync Date - + Reset Zurücksetzen - + Current Font Aktuelle Schriftart - + Current font changed to %1. Aktuelle Schriftart in %1 geändert. - + Theme Thema - + Changing theme to %1 Design zu %1 geändert - + Disable 2FA? 2FA deaktivieren? - + Enter your wallet password to confirm Geben Sie zur Bestätigung das Kennwort ihrer Brieftasche ein - + Type password Kennwort eingeben - + 2FA status 2FA Status - + 2FA disabled successfully 2FA erfolgreich deaktiviert - - + + Ok Ok - + Wrong password! Falsches Kennwort! - + Wallet password is incorrect Kennwort der Brieftasche ist falsch - + Reuse static RPC password - + Application Version Anwendungsversion - + copied to clipboard In die Zwischenablage kopiert - + About & Version Über & Version - - + + Reset wallet configuration Konfiguration der Brieftasche zurücksetzen - + This will restart your wallet with default settings Dadurch wird Ihre Brieftasche mit den Standardeinstellungen neu gestartet - - + + Confirm Bestätigen - + Ask system's password before sending coins ? (2FA) Vor dem Senden von Coins nach dem Kennwort des Systems fragen? (2FA) - + View seed and private keys Seed- und privaten Schlüsseln anzeigen - - + + Show Zeigen - + Setup Camouflage Password Tarnkennwort einrichten - + Open Öffnen - + Disclaimer and ToS Haftungsausschluss und Nutzungsbedingungen - + Application version Anwendungsversion - + MM2 version MM2 Version - + MM2 Version MM2 Version - + MM2 Version copied to clipboard. MM2 Version in die Zwischenablage kopiert. - + + + Peer ID + + + + + Peer ID copied to clipboard. + + + + Qt version Qt Version - + Qt Version Qt Version - + Qt Version copied to clipboard. Qt Version in die Zwischenablage kopiert. - + Search Update Update suchen - + Logout Abmelden @@ -4546,7 +4557,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. diff --git a/atomic_defi_design/assets/languages/atomic_defi_en.ts b/atomic_defi_design/assets/languages/atomic_defi_en.ts index c5f21ab0ca..e720e656bc 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_en.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_en.ts @@ -3413,252 +3413,263 @@ Please select a new order. SettingModal - - + + Cancel Cancel - + Settings - + General - + Language - + User Interface - + Security - + Enable Desktop Notifications - + Maximum number of enabled coins - + Logs - + Open Folder - + Reset - + Current Font - + Current font changed to %1. - + Theme - + Changing theme to %1 - + Application Version - + copied to clipboard - + About & Version - + Hide Poison Transactions in History - + ZHTLC sync date - + use date sync - + Sync Date - - + + Reset wallet configuration - + This will restart your wallet with default settings - - + + Confirm - + Ask system's password before sending coins ? (2FA) - + Disable 2FA? - + Enter your wallet password to confirm - + Type password - + 2FA status - + 2FA disabled successfully - - + + Ok - + Wrong password! - + Wallet password is incorrect - + View seed and private keys - - + + Show - + Setup Camouflage Password - + Open - + Reuse static RPC password - + Disclaimer and ToS - + Application version - + MM2 version - + MM2 Version - + MM2 Version copied to clipboard. - + + + Peer ID + + + + + Peer ID copied to clipboard. + + + + Qt version - + Qt Version - + Qt Version copied to clipboard. - + Search Update - + Logout @@ -4528,7 +4539,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. diff --git a/atomic_defi_design/assets/languages/atomic_defi_es.ts b/atomic_defi_design/assets/languages/atomic_defi_es.ts index f739653a59..92a59ae6bf 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_es.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_es.ts @@ -3417,252 +3417,263 @@ Seleccione un nuevo pedido. SettingModal - - + + Cancel Cancelar - + Settings Configuración - + General General - + Language Idioma - + User Interface Interfaz - + Security Seguridad - + Enable Desktop Notifications Habilitar notificaciones de escritorio - + Maximum number of enabled coins Número máximo de monedas habilitadas - + Logs Registros - + Open Folder Carpeta Abierta - + Reset Restablecer - + Current Font Fuente Actual - + Current font changed to %1. La fuente actual cambió a %1. - + Theme Tema - + Changing theme to %1 Cambiando el tema a %1 - + Application Version La versión de la aplicación - + copied to clipboard copiado al portapapeles - + About & Version Acerca de & Versión - + Hide Poison Transactions in History - + ZHTLC sync date - + use date sync - + Sync Date - - + + Reset wallet configuration Restablecer configuración de billetera - + This will restart your wallet with default settings Esto reiniciará su billetera con la configuración predeterminada - - + + Confirm Confirmar - + Ask system's password before sending coins ? (2FA) ¿Preguntar la contraseña del sistema antes de enviar monedas? (2FA) - + Disable 2FA? ¿Deshabilitar 2FA? - + Enter your wallet password to confirm Ingrese la contraseña de su billetera para confirmar - + Type password Escriba la contraseña - + 2FA status Estado 2FA - + 2FA disabled successfully 2FA deshabilitado correctamente - - + + Ok Ok - + Wrong password! ¡Contraseña incorrecta! - + Wallet password is incorrect Contraseña de la billetera es incorrecta - + View seed and private keys Ver semilla y claves privadas - - + + Show Mostrar - + Setup Camouflage Password Configuración de Contraseña Camuflaje - + Open Abrir - + Reuse static RPC password - + Disclaimer and ToS Descargo de Responsabilidad y Terminos de Servicio - + Application version Versión de Aplicación - + MM2 version Versión MM2 - + MM2 Version Versión MM2 - + MM2 Version copied to clipboard. Versión MM2 copiada al portapapeles. - + + + Peer ID + + + + + Peer ID copied to clipboard. + + + + Qt version Versión Qt - + Qt Version Versión Qt - + Qt Version copied to clipboard. Versión de Qt copiada al portapapeles. - + Search Update Buscar Actualizacion - + Logout Cerrar sesión @@ -4549,7 +4560,7 @@ Esto puede tardar unos minutos... atomic_dex::settings_page - + An error has occurred. Se ha producido un error. diff --git a/atomic_defi_design/assets/languages/atomic_defi_fr.ts b/atomic_defi_design/assets/languages/atomic_defi_fr.ts index c342c96189..16cd54c466 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_fr.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_fr.ts @@ -3413,252 +3413,263 @@ Please select a new order. SettingModal - - + + Cancel Annuler - + Settings Réglages - + Language Langue - + User Interface Interface utilsateur - + Security Sécurité - + General Général - + About & Version À propos & version - + Enable Desktop Notifications Activer les notifications - + Hide Poison Transactions in History - + Maximum number of enabled coins Nombre maximum d'actifs activés - + Logs Journaux - + Open Folder Ouvrir le dossier - + ZHTLC sync date - + use date sync - + Sync Date - - + + Reset wallet configuration Réinitialiser la configuration du portefeuille - + This will restart your wallet with default settings Cela redémarrera votre portefeuille avec les paramètres par défaut - - + + Confirm Confirmer - + Changing theme to %1 Changer le thème en %1 - + Disable 2FA? - + Enter your wallet password to confirm - + Type password Tapez votre mot de passe - + 2FA status - + 2FA disabled successfully - - + + Ok Ok - + Wrong password! - + Wallet password is incorrect - + Reuse static RPC password - + Application Version - + copied to clipboard copié dans le presse-papier - + Reset Réinitialiser - + Current Font Police actuelle - + Current font changed to %1. La police actuelle est passée à %1. - + Theme Thème - + Ask system's password before sending coins ? (2FA) Demander le mot de passe du système avant d'envoyer des actifs ? (2FA) - + Application version Version de l'application - + MM2 version Version de MM2 - + MM2 Version MM2 Version - + MM2 Version copied to clipboard. MM2 Version copiée dans le presse-papiers. - + + + Peer ID + + + + + Peer ID copied to clipboard. + + + + Qt version Version de Qt - + Qt Version Qt Version - + Qt Version copied to clipboard. Version Qt copiée dans le presse-papiers. - + Search Update Rechercher une mise à jour - + Logout Se déconnecter - + View seed and private keys Afficher la phrase de récupération et les clefs privées - - + + Show Montrer - + Setup Camouflage Password Configurer le mot de passe de camouflage - + Open Ouvrir - + Disclaimer and ToS Clause de non-responsabilité et conditions d'utilisation @@ -4530,7 +4541,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. diff --git a/atomic_defi_design/assets/languages/atomic_defi_ru.ts b/atomic_defi_design/assets/languages/atomic_defi_ru.ts index bca0ddeeae..896a502ed2 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_ru.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_ru.ts @@ -3419,252 +3419,263 @@ Please select a new order. SettingModal - - + + Cancel Отмена - + Settings Настройки - + Language Язык - + User Interface Интерфейс - + Security Приватность - + General Общие - + About & Version О программе - + Enable Desktop Notifications Включить уведомления для рабочего стола - + Hide Poison Transactions in History - + Maximum number of enabled coins Макс. количество активированных монет - + Logs Логи - + Open Folder Открыть папку с логами - + ZHTLC sync date - + use date sync - + Sync Date - - + + Reset wallet configuration Сбросить конфигурацию кошелька - + This will restart your wallet with default settings Эта опция перезапустит ваш кошелек с настройками по умолчанию - - + + Confirm Подтвердить - + Changing theme to %1 Изменить тему на %1 - + Disable 2FA? - + Enter your wallet password to confirm - + Type password Введите пароль - + 2FA status - + 2FA disabled successfully - - + + Ok Ок - + Wrong password! - + Wallet password is incorrect - + Reuse static RPC password - + Application Version - + copied to clipboard скопировано в буфер - + Reset Сбросить - + Current Font Текущий шрифт - + Current font changed to %1. Текущий шрифт изменен на %1. - + Theme Тема - + Ask system's password before sending coins ? (2FA) Спрашивать системный пароль перед отправкой монет? (2FA) - + Application version Версия приложения - + MM2 version Версия MM2 - + MM2 Version Версия MM2 - + MM2 Version copied to clipboard. Версия MM2 скопирована в буфер обмена. - + + + Peer ID + + + + + Peer ID copied to clipboard. + + + + Qt version Версия Qt - + Qt Version Версия Qt - + Qt Version copied to clipboard. Версия Qt скопирована в буфер обмена. - + Search Update Проверить на обновления - + Logout Выход - + View seed and private keys Показать seed-фразу и приватные ключи - - + + Show Показать - + Setup Camouflage Password Установить камуфляжный пароль - + Open Установить - + Disclaimer and ToS Дисклеймер и Условия Использования @@ -4534,7 +4545,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. diff --git a/atomic_defi_design/assets/languages/atomic_defi_tr.ts b/atomic_defi_design/assets/languages/atomic_defi_tr.ts index 6b3fca8014..5dc5466106 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_tr.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_tr.ts @@ -3407,252 +3407,263 @@ Please select a new order. SettingModal - - + + Cancel İptal - + Settings Ayarlar - + Language Dil - + User Interface Kullanıcı Arayüzü - + Security Güvenlik - + General Genel - + About & Version - + Enable Desktop Notifications Masaüstü Bildirimlerini Aktif Et - + Hide Poison Transactions in History - + Maximum number of enabled coins Maksimum etkin koin sayısı - + Logs Günlük Kaydı - + Open Folder Klasörü Aç - + ZHTLC sync date - + use date sync - + Sync Date - - + + Reset wallet configuration - + This will restart your wallet with default settings - - + + Confirm Onayla - + Changing theme to %1 - + Disable 2FA? - + Enter your wallet password to confirm - + Type password - + 2FA status - + 2FA disabled successfully - - + + Ok Tamam - + Wrong password! - + Wallet password is incorrect - + Reuse static RPC password - + Application Version - + copied to clipboard - + Reset Sıfırla - + Current Font Geçerli Yazı Tipi - + Current font changed to %1. - + Theme Tema - + Ask system's password before sending coins ? (2FA) Para göndermeden önce sistem parolası sorulsun mu ? (2FA) - + Application version Uygulama sürümü - + MM2 version MM2 sürümü - + MM2 Version - + MM2 Version copied to clipboard. - + + + Peer ID + + + + + Peer ID copied to clipboard. + + + + Qt version Qt sürümü - + Qt Version - + Qt Version copied to clipboard. - + Search Update Güncelleme Ara - + Logout Çıkış - + View seed and private keys Seed ve özel anahtarları görüntüle - - + + Show Göster - + Setup Camouflage Password Kamuflaj Parolasını Ayarla - + Open - + Disclaimer and ToS Sorumluluk Reddi ve K.Ş. @@ -4522,7 +4533,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. diff --git a/src/core/atomicdex/api/mm2/mm2.cpp b/src/core/atomicdex/api/mm2/mm2.cpp index ccaa9e2c55..be53b893dc 100644 --- a/src/core/atomicdex/api/mm2/mm2.cpp +++ b/src/core/atomicdex/api/mm2/mm2.cpp @@ -615,6 +615,33 @@ namespace atomic_dex::mm2 return ""; } + std::string + peer_id() + { + nlohmann::json json_data = template_request("get_my_peer_id"); + try + { + auto client = std::make_unique(FROM_STD_STR(atomic_dex::g_dex_rpc)); + web::http::http_request request; + request.set_method(web::http::methods::POST); + request.set_body(json_data.dump()); + web::http::http_response resp = client->request(request).get(); + if (resp.status_code() == 200) + { + std::string body = TO_STD_STR(resp.extract_string(true).get()); + nlohmann::json body_json = nlohmann::json::parse(body); + return body_json.at("result").get(); + } + + return "error occured during rpc_version"; + } + catch (const web::http::http_exception& exception) + { + return "error occured during rpc_version"; + } + return ""; + } + kmd_rewards_info_answer process_kmd_rewards_answer(nlohmann::json result) { diff --git a/src/core/atomicdex/api/mm2/mm2.hpp b/src/core/atomicdex/api/mm2/mm2.hpp index a36ab7965c..b2f9bae3a6 100644 --- a/src/core/atomicdex/api/mm2/mm2.hpp +++ b/src/core/atomicdex/api/mm2/mm2.hpp @@ -43,6 +43,7 @@ namespace atomic_dex::mm2 nlohmann::json basic_batch_answer(const web::http::http_response& resp); std::string rpc_version(); + std::string peer_id(); struct trade_fee_request { diff --git a/src/core/atomicdex/pages/qt.settings.page.cpp b/src/core/atomicdex/pages/qt.settings.page.cpp index e6af443159..af5dbb6cd7 100644 --- a/src/core/atomicdex/pages/qt.settings.page.cpp +++ b/src/core/atomicdex/pages/qt.settings.page.cpp @@ -707,6 +707,11 @@ namespace atomic_dex return QString::fromStdString(mm2::rpc_version()); } + QString settings_page::get_peerid() + { + return QString::fromStdString(mm2::peer_id()); + } + QString settings_page::get_export_folder() { return QString::fromStdString(utils::get_atomic_dex_export_folder().string()); diff --git a/src/core/atomicdex/pages/qt.settings.page.hpp b/src/core/atomicdex/pages/qt.settings.page.hpp index 2032da6bb7..b6f765405f 100644 --- a/src/core/atomicdex/pages/qt.settings.page.hpp +++ b/src/core/atomicdex/pages/qt.settings.page.hpp @@ -121,6 +121,7 @@ namespace atomic_dex Q_INVOKABLE void submit(); Q_INVOKABLE QStringList retrieve_seed(const QString& wallet_name, const QString& password); Q_INVOKABLE static QString get_mm2_version(); + Q_INVOKABLE static QString get_peerid(); Q_INVOKABLE static QString get_log_folder(); Q_INVOKABLE static QString get_export_folder(); Q_INVOKABLE static QString get_version(); From cde14c7e46223b5ff70b5060e76f08f6a53234ac Mon Sep 17 00:00:00 2001 From: smk762 Date: Sun, 17 Dec 2023 20:36:41 +0800 Subject: [PATCH 09/43] add log --- src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp index 0a22ce1986..24468850ba 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp @@ -174,11 +174,12 @@ namespace atomic_dex { if (safe_float(m_system_manager.get_system().get_volume().toStdString()) > 0) { - SPDLOG_INFO("qt_orderbook_wrapper::refresh_best_orders()"); + SPDLOG_INFO("qt_orderbook_wrapper::refresh_best_orders() >> process_best_orders()"); this->m_system_manager.get_system().process_best_orders(); } else { + SPDLOG_INFO("qt_orderbook_wrapper::refresh_best_orders() >> get_best_orders()->clear_orderbook()"); get_best_orders()->clear_orderbook(); } } From bcf32758585434169b89f6e72082e3eb6c9e31c7 Mon Sep 17 00:00:00 2001 From: smk762 Date: Mon, 18 Dec 2023 01:02:46 +0800 Subject: [PATCH 10/43] show segwit in simple mode --- .../Dex/Exchange/Trade/SimpleView/Trade.qml | 4 +-- .../atomicdex/services/mm2/mm2.service.cpp | 34 +++++++++---------- .../atomicdex/services/mm2/mm2.service.hpp | 2 +- .../atomicdex/utilities/global.utilities.cpp | 15 ++++---- .../atomicdex/utilities/global.utilities.hpp | 2 +- src/core/atomicdex/utilities/qt.utilities.cpp | 4 +-- src/core/atomicdex/utilities/qt.utilities.hpp | 2 +- 7 files changed, 31 insertions(+), 32 deletions(-) diff --git a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml index ebea341ac2..0665bba275 100644 --- a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml +++ b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml @@ -398,7 +398,7 @@ ClipRRect // Trade Card width: 60 - text: _selectedTickerIcon.enabled ? atomic_qt_utilities.retrieve_main_ticker(selectedTicker) : qsTr("Pick a coin") + text: _selectedTickerIcon.enabled ? atomic_qt_utilities.retrieve_main_ticker(selectedTicker, false, true) : qsTr("Pick a coin") font.pixelSize: Constants.Style.textSizeSmall2 wrapMode: Text.NoWrap @@ -580,7 +580,7 @@ ClipRRect // Trade Card anchors.leftMargin: 10 width: 60 - text: enabled ? atomic_qt_utilities.retrieve_main_ticker(selectedOrder.coin) : "" + text: enabled ? atomic_qt_utilities.retrieve_main_ticker(selectedOrder.coin, false, true) : "" font.pixelSize: Constants.Style.textSizeSmall2 wrapMode: Text.NoWrap diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index 6521d7d319..3e4cca0467 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -287,27 +287,25 @@ namespace atomic_dex if (s >= 5s) { - if (m_nb_update_required > 0) + SPDLOG_DEBUG("coin_status_update required, {}", m_nb_update_required); + + auto coins = this->get_enabled_coins(); + std::vector tickers; + for (auto&& coin: coins) { - auto coins = this->get_enabled_coins(); - std::vector tickers; - for (auto&& coin: coins) - { - SPDLOG_DEBUG("{}: Active [{}]", coin.ticker, coin.active); - if (!coin.active) - { - tickers.push_back(coin.ticker); - } - } - if (!tickers.empty()) + if (!coin.active) { - SPDLOG_DEBUG("coin_status_update required, {}", m_nb_update_required); - update_coin_status(this->m_current_wallet_name, tickers, true, m_coins_informations, m_coin_cfg_mutex); + tickers.push_back(coin.ticker); } - m_nb_update_required -= 1; } - fetch_current_orderbook_thread(false); - batch_fetch_orders_and_swap(); + SPDLOG_DEBUG("Making sure {} enabled coins are marked as active", tickers.size()); + if (!tickers.empty()) + { + // Mark coins as active internally, and updates the coins file + update_coin_status(this->m_current_wallet_name, tickers, true, m_coins_informations, m_coin_cfg_mutex); + } + fetch_current_orderbook_thread(false); // process_orderbook (not a reset) if on trading page + batch_fetch_orders_and_swap(); // gets 'my_orders', 'my_recent_swaps' & 'active_swaps' m_orderbook_clock = std::chrono::high_resolution_clock::now(); } @@ -1866,7 +1864,7 @@ namespace atomic_dex void mm2_service::fetch_current_orderbook_thread(bool is_a_reset) { - //! m_orderbook_thread_active ? SPDLOG_WARN("Nothing to achieve, sleeping") : SPDLOG_INFO("Fetch current orderbook"); + m_orderbook_thread_active ? SPDLOG_WARN("Not fetching orderbook, m_orderbook_thread_active is true") : SPDLOG_INFO("Fetching current orderbook"); //! If thread is not active ex: we are not on the trading page anymore, we continue sleeping. if (!m_orderbook_thread_active) diff --git a/src/core/atomicdex/services/mm2/mm2.service.hpp b/src/core/atomicdex/services/mm2/mm2.service.hpp index 79b4541161..a756b7c1c2 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.hpp +++ b/src/core/atomicdex/services/mm2/mm2.service.hpp @@ -93,7 +93,7 @@ namespace atomic_dex //! Atomicity / Threads std::atomic_bool m_mm2_running{false}; - std::atomic_bool m_orderbook_thread_active{false}; + std::atomic_bool m_orderbook_thread_active{false}; // Only active when in trading view (pro and simple) std::atomic_size_t m_nb_update_required{0}; std::thread m_mm2_init_thread; diff --git a/src/core/atomicdex/utilities/global.utilities.cpp b/src/core/atomicdex/utilities/global.utilities.cpp index 0f906fcfe6..bd6a0325cf 100644 --- a/src/core/atomicdex/utilities/global.utilities.cpp +++ b/src/core/atomicdex/utilities/global.utilities.cpp @@ -252,17 +252,18 @@ namespace atomic_dex::utils } std::string - retrieve_main_ticker(const std::string& ticker, const bool segwit_only) + retrieve_main_ticker(const std::string& ticker, bool segwit_only, bool exclude_segwit) { - auto pos = ticker.find("-"); - if (segwit_only) + bool is_segwit = ticker.find("-segwit") != std::string::npos; + if (exclude_segwit && is_segwit) { - if (ticker.find("-segwit") != std::string::npos) - { - return ticker.substr(0, pos); - } return ticker; } + auto pos = ticker.find("-"); + if (segwit_only && is_segwit) + { + return ticker.substr(0, pos); + } if (pos != std::string::npos) { return ticker.substr(0, pos); diff --git a/src/core/atomicdex/utilities/global.utilities.hpp b/src/core/atomicdex/utilities/global.utilities.hpp index 90eeace9b8..89df4fa7f9 100644 --- a/src/core/atomicdex/utilities/global.utilities.hpp +++ b/src/core/atomicdex/utilities/global.utilities.hpp @@ -94,7 +94,7 @@ namespace atomic_dex::utils ENTT_API std::filesystem::path get_themes_path(); ENTT_API std::filesystem::path get_logo_path(); - std::string retrieve_main_ticker(const std::string& ticker, const bool segwit_only = false); + std::string retrieve_main_ticker(const std::string& ticker, bool segwit_only=false, bool exclude_segwit=false); void to_eth_checksum(std::string& address); void json_keys(nlohmann::json j); diff --git a/src/core/atomicdex/utilities/qt.utilities.cpp b/src/core/atomicdex/utilities/qt.utilities.cpp index a2f9e0faac..93a3a166c8 100644 --- a/src/core/atomicdex/utilities/qt.utilities.cpp +++ b/src/core/atomicdex/utilities/qt.utilities.cpp @@ -165,8 +165,8 @@ namespace atomic_dex } QString - qt_utilities::retrieve_main_ticker(const QString& ticker) const + qt_utilities::retrieve_main_ticker(const QString& ticker, bool segwit_only, bool exclude_segwit) const { - return QString::fromStdString(atomic_dex::utils::retrieve_main_ticker(ticker.toStdString())); + return QString::fromStdString(atomic_dex::utils::retrieve_main_ticker(ticker.toStdString(), segwit_only, exclude_segwit)); } } // namespace atomic_dex diff --git a/src/core/atomicdex/utilities/qt.utilities.hpp b/src/core/atomicdex/utilities/qt.utilities.hpp index cf905f1b08..c388294017 100644 --- a/src/core/atomicdex/utilities/qt.utilities.hpp +++ b/src/core/atomicdex/utilities/qt.utilities.hpp @@ -92,6 +92,6 @@ namespace atomic_dex * @return a ticker * @example -> retrieve_main_ticker("BUSD") -> BUSD retrieve_main_ticker("BUSD-ERC20") -> BUSD */ - Q_INVOKABLE QString retrieve_main_ticker(const QString& ticker) const; + Q_INVOKABLE QString retrieve_main_ticker(const QString& ticker, bool segwit_only = false, bool exclude_segwit = false) const; }; } // namespace atomic_dex From fa1e8d677c58fdb8c4db05e513a47fc0f751a45e Mon Sep 17 00:00:00 2001 From: smk762 Date: Mon, 18 Dec 2023 03:43:33 +0800 Subject: [PATCH 11/43] add ercv2 activation functions --- src/core/atomicdex/api/mm2/mm2.client.cpp | 4 + .../api/mm2/rpc_v2/rpc2.enable_erc20.hpp | 7 +- .../rpc_v2/rpc2.enable_eth_with_tokens.hpp | 5 +- .../atomicdex/services/mm2/mm2.service.cpp | 181 ++++++++++++++++-- .../atomicdex/services/mm2/mm2.service.hpp | 6 + 5 files changed, 186 insertions(+), 17 deletions(-) diff --git a/src/core/atomicdex/api/mm2/mm2.client.cpp b/src/core/atomicdex/api/mm2/mm2.client.cpp index 411e5e40ba..9393c54ab0 100644 --- a/src/core/atomicdex/api/mm2/mm2.client.cpp +++ b/src/core/atomicdex/api/mm2/mm2.client.cpp @@ -30,6 +30,8 @@ #include "atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.enable_erc20.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_bch_with_tokens_rpc.hpp" @@ -166,9 +168,11 @@ namespace atomic_dex::mm2 template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); + template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); + template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_erc20.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_erc20.hpp index 1d59962b05..953bb8f67d 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_erc20.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_erc20.hpp @@ -44,9 +44,10 @@ namespace atomic_dex::mm2 using expected_error_type = rpc_basic_error_type; - expected_request_type request; - std::optional result; - std::optional error; + expected_request_type request; + std::optional result; + std::optional error; + std::string raw_result; }; using enable_erc20_rpc_request = enable_erc20_rpc::expected_request_type; diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp index 5561b2fa40..f9f3c358ee 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp @@ -69,8 +69,8 @@ namespace atomic_dex::mm2 }; std::size_t current_block; - std::unordered_map eth_addresses_infos; - std::unordered_map erc20_addresses_infos; + std::unordered_map eth_addresses_infos; + std::unordered_map erc20_addresses_infos; }; using expected_error_type = rpc_basic_error_type; @@ -78,6 +78,7 @@ namespace atomic_dex::mm2 expected_request_type request; std::optional result; std::optional error; + std::string raw_result; }; using enable_eth_with_tokens_request_rpc = enable_eth_with_tokens_rpc::expected_request_type; diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index 3e4cca0467..6d8423c69c 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -801,6 +801,109 @@ namespace atomic_dex } + void mm2_service::enable_erc20_coin(coin_config coin_config, std::string parent_ticker) + { + enable_erc20_coins(t_coins{std::move(coin_config)}, parent_ticker); + } + + void mm2_service::enable_erc20_coins(const t_coins& coins, const std::string parent_ticker) + { + SPDLOG_INFO("Parent ticker: {}", parent_ticker); + auto callback = [this](RpcRequest rpc) + { + if (rpc.error) + { + SPDLOG_ERROR("{} {}: ", rpc.request.ticker, rpc.error->error_type); + if (rpc.error->error_type.find("PlatformIsAlreadyActivated") != std::string::npos || rpc.error->error_type.find("TokenIsAlreadyActivated") != std::string::npos) + { + SPDLOG_ERROR("{} {}: ", rpc.request.ticker, rpc.error->error_type); + fetch_single_balance(get_coin_info(rpc.request.ticker)); + m_coins_informations[rpc.request.ticker].currently_enabled = true; + dispatcher_.trigger(coin_fully_initialized{.tickers = {rpc.request.ticker}}); + if constexpr (std::is_same_v) + { + for (const auto& erc20_coin_info : rpc.request.erc20_tokens_requests) + { + SPDLOG_ERROR("{} {}: ", erc20_coin_info.ticker, rpc.error->error_type); + fetch_single_balance(get_coin_info(erc20_coin_info.ticker)); + m_coins_informations[erc20_coin_info.ticker].currently_enabled = true; + dispatcher_.trigger(coin_fully_initialized{.tickers = {erc20_coin_info.ticker}}); + } + } + } + else + { + m_coins_informations[rpc.request.ticker].currently_enabled = false; + update_coin_active({rpc.request.ticker}, false); + this->dispatcher_.trigger(rpc.request.ticker, rpc.error->error); + } + } + else + { + dispatcher_.trigger(coin_fully_initialized{.tickers = {rpc.request.ticker}}); + fetch_single_balance(get_coin_info(rpc.request.ticker)); + m_coins_informations[rpc.request.ticker].currently_enabled = true; + if constexpr (std::is_same_v) + { + for (const auto& erc20_address_info : rpc.result->erc20_addresses_infos) + { + dispatcher_.trigger(coin_fully_initialized{.tickers = {erc20_address_info.first}}); + process_balance_answer(rpc); + m_coins_informations[erc20_address_info.first].currently_enabled = true; + } + } + process_balance_answer(rpc); + } + }; + + if (!has_coin(parent_ticker)) + { + static constexpr auto error = "{} is not present in the config. Cannot enable {} tokens."; + this->dispatcher_.trigger(parent_ticker, fmt::format(error, parent_ticker, parent_ticker)); + return; + } + + auto parent_ticker_info = get_coin_info(parent_ticker); + + if (parent_ticker_info.currently_enabled) + { + for (const auto& coin_config : coins) + { + mm2::enable_erc20_rpc rpc{.request={.ticker = coin_config.ticker}}; + + if (coin_config.ticker == parent_ticker_info.ticker) + { + continue; + } + m_mm2_client.process_rpc_async(rpc.request, callback); + } + } + else + { + mm2::enable_eth_with_tokens_rpc rpc; + + rpc.request.coin_type = parent_ticker_info.coin_type; + rpc.request.is_testnet = parent_ticker_info.is_testnet.value_or(false); + rpc.request.ticker = parent_ticker_info.ticker; + rpc.request.nodes = parent_ticker_info.urls.value_or(std::vector{}); + rpc.request.swap_contract_address = parent_ticker_info.swap_contract_address.value_or(""); + if (parent_ticker_info.fallback_swap_contract_address.value_or("") != "") + { + rpc.request.fallback_swap_contract = parent_ticker_info.fallback_swap_contract_address.value_or(""); + } + for (const auto& coin_config : coins) + { + if (coin_config.ticker == parent_ticker_info.ticker) + { + continue; + } + rpc.request.erc20_tokens_requests.push_back({.ticker = coin_config.ticker}); + } + m_mm2_client.process_rpc_async(rpc.request, callback); + } + this->m_nb_update_required += 1; + } + void mm2_service::enable_tendermint_coin(coin_config coin_config, std::string parent_ticker) { enable_tendermint_coins(t_coins{std::move(coin_config)}, parent_ticker); @@ -897,6 +1000,52 @@ namespace atomic_dex this->m_nb_update_required += 1; } + void mm2_service::process_balance_answer(const mm2::enable_erc20_rpc& rpc) + { + const auto& answer = rpc.result.value(); + mm2::balance_answer balance_answer; + + balance_answer.address = answer.balances.begin()->first; + balance_answer.balance = answer.balances.begin()->second.spendable; + balance_answer.coin = answer.platform_coin; + + { + std::unique_lock lock(m_balance_mutex); + m_balance_informations[balance_answer.coin] = std::move(balance_answer); + } + } + + void mm2_service::process_balance_answer(const mm2::enable_eth_with_tokens_rpc& rpc) + { + const auto& answer = rpc.result.value(); + { + mm2::balance_answer balance_answer; + + balance_answer.coin = rpc.request.ticker; + balance_answer.balance = answer.eth_addresses_infos.begin()->second.balances.spendable; + balance_answer.address = answer.eth_addresses_infos.begin()->first; + { + std::unique_lock lock(m_balance_mutex); + m_balance_informations[balance_answer.coin] = std::move(balance_answer); + } + } + if (answer.erc20_addresses_infos.empty()) + { + return; + } + for (auto [address, data] : answer.erc20_addresses_infos) + { + mm2::balance_answer balance_answer; + balance_answer.coin = data.balances.begin()->first; + balance_answer.address = address; + balance_answer.balance = data.balances.begin()->second.spendable; + { + std::unique_lock lock(m_balance_mutex); + m_balance_informations[balance_answer.coin] = std::move(balance_answer); + } + } + } + void mm2_service::process_balance_answer(const mm2::enable_tendermint_token_rpc& rpc) { const auto& answer = rpc.result.value(); @@ -2520,24 +2669,32 @@ namespace atomic_dex void mm2_service::process_balance_answer(const nlohmann::json& answer) { - t_balance_answer answer_r; - - mm2::from_json(answer, answer_r); - if (is_pin_cfg_enabled()) + try { - std::shared_lock lock(m_balance_mutex); + t_balance_answer answer_r; + + mm2::from_json(answer, answer_r); + if (is_pin_cfg_enabled()) + { + std::shared_lock lock(m_balance_mutex); + + if (m_balance_informations.find(answer_r.coin) != m_balance_informations.end()) + { + return; + } + } + t_float_50 result = t_float_50(answer_r.balance) * m_balance_factor; + answer_r.balance = result.str(8, std::ios_base::fixed); - if (m_balance_informations.find(answer_r.coin) != m_balance_informations.end()) { - return; + std::unique_lock lock(m_balance_mutex); + m_balance_informations[answer_r.coin] = std::move(answer_r); } } - t_float_50 result = t_float_50(answer_r.balance) * m_balance_factor; - answer_r.balance = result.str(8, std::ios_base::fixed); - + catch (const std::exception& error) { - std::unique_lock lock(m_balance_mutex); - m_balance_informations[answer_r.coin] = std::move(answer_r); + SPDLOG_ERROR("exception in process_balance_answer: {}", error.what()); + SPDLOG_DEBUG("exception in process_balance_answer: {}", answer.dump(4)); } } diff --git a/src/core/atomicdex/services/mm2/mm2.service.hpp b/src/core/atomicdex/services/mm2/mm2.service.hpp index a756b7c1c2..7a185ce90c 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.hpp +++ b/src/core/atomicdex/services/mm2/mm2.service.hpp @@ -39,6 +39,8 @@ #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_with_assets.hpp" #include "atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.enable_erc20.hpp" +#include "atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp" #include "atomicdex/config/raw.mm2.coins.cfg.hpp" #include "atomicdex/constants/dex.constants.hpp" #include "atomicdex/data/dex/orders.and.swaps.data.hpp" @@ -178,6 +180,8 @@ namespace atomic_dex void enable_slp_coins(const t_coins& coins); void enable_slp_testnet_coin(coin_config coin_config); void enable_slp_testnet_coins(const t_coins& coins); + void enable_erc20_coin(coin_config coin_config, std::string parent_ticker); + void enable_erc20_coins(const t_coins& coins, const std::string parent_ticker); void enable_tendermint_coin(coin_config coin_config, std::string parent_ticker); void enable_tendermint_coins(const t_coins& coins, const std::string parent_ticker); void enable_zhtlc(const t_coins& coins); @@ -187,6 +191,8 @@ namespace atomic_dex void process_balance_answer(const mm2::enable_slp_rpc& rpc); // Called after enabling an SLP coin. void process_balance_answer(const mm2::enable_tendermint_with_assets_rpc& rpc); void process_balance_answer(const mm2::enable_tendermint_token_rpc& rpc); + void process_balance_answer(const mm2::enable_eth_with_tokens_rpc& rpc); + void process_balance_answer(const mm2::enable_erc20_rpc& rpc); public: //! Add a new coin in the coin_info cfg add_new_coin(normal_cfg, mm2_cfg) From 88224f27c7c0199c405f07264645fdb53704fa35 Mon Sep 17 00:00:00 2001 From: smk762 Date: Mon, 18 Dec 2023 18:12:11 +0800 Subject: [PATCH 12/43] rename variable for clarity --- src/core/atomicdex/events/events.hpp | 2 +- src/core/atomicdex/pages/qt.trading.page.cpp | 2 +- src/core/atomicdex/services/mm2/mm2.service.cpp | 15 +++++++++++---- src/core/atomicdex/services/mm2/mm2.service.hpp | 3 ++- .../atomic.dex.provider.cex.prices.tests.cpp | 2 +- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/core/atomicdex/events/events.hpp b/src/core/atomicdex/events/events.hpp index 412e0eb00d..3e00e35127 100644 --- a/src/core/atomicdex/events/events.hpp +++ b/src/core/atomicdex/events/events.hpp @@ -117,7 +117,7 @@ namespace atomic_dex std::string ticker; }; - struct orderbook_refresh + struct refresh_orderbook_model_data { std::string base; std::string rel; diff --git a/src/core/atomicdex/pages/qt.trading.page.cpp b/src/core/atomicdex/pages/qt.trading.page.cpp index bf47207d36..cbcb77bafd 100644 --- a/src/core/atomicdex/pages/qt.trading.page.cpp +++ b/src/core/atomicdex/pages/qt.trading.page.cpp @@ -103,7 +103,7 @@ namespace atomic_dex } emit mm2MinTradeVolChanged(); - dispatcher_.trigger(base.toStdString(), rel.toStdString()); + dispatcher_.trigger(base.toStdString(), rel.toStdString()); } void diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index 6d8423c69c..6f358de133 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -268,7 +268,7 @@ namespace atomic_dex m_info_clock = std::chrono::high_resolution_clock::now(); dispatcher_.sink().connect<&mm2_service::on_gui_enter_trading>(*this); dispatcher_.sink().connect<&mm2_service::on_gui_leave_trading>(*this); - dispatcher_.sink().connect<&mm2_service::on_refresh_orderbook_model_data>(*this); + dispatcher_.sink().connect<&mm2_service::on_refresh_orderbook_model_data>(*this); SPDLOG_INFO("mm2_service created"); } @@ -321,7 +321,7 @@ namespace atomic_dex SPDLOG_INFO("destroying mm2 service..."); dispatcher_.sink().disconnect<&mm2_service::on_gui_enter_trading>(*this); dispatcher_.sink().disconnect<&mm2_service::on_gui_leave_trading>(*this); - dispatcher_.sink().disconnect<&mm2_service::on_refresh_orderbook_model_data>(*this); + dispatcher_.sink().disconnect<&mm2_service::on_refresh_orderbook_model_data>(*this); SPDLOG_INFO("mm2 signals successfully disconnected"); bool mm2_stopped = false; if (m_mm2_running) @@ -1929,7 +1929,7 @@ namespace atomic_dex process_orderbook_extras(batch, is_a_reset); } m_orderbook = rpc.result.value(); - SPDLOG_ERROR("Triggering [process_orderbook_finished]: {}", is_a_reset); + SPDLOG_DEBUG("Triggering [process_orderbook_finished]: {}", is_a_reset); this->dispatcher_.trigger(is_a_reset); } }; @@ -2467,7 +2467,14 @@ namespace atomic_dex } void - mm2_service::on_refresh_orderbook_model_data(const orderbook_refresh& evt) + mm2_service::update_sync_ticker_pair(std::string base, std::string rel) + { + SPDLOG_DEBUG("update_sync_ticker_pair: [{} / {}]", base, rel); + this->m_synchronized_ticker_pair = std::make_pair(base, rel); + } + + void + mm2_service::on_refresh_orderbook_model_data(const refresh_orderbook_model_data& evt) { SPDLOG_DEBUG("refreshing orderbook pair: [{} / {}]", evt.base, evt.rel); this->m_synchronized_ticker_pair = std::make_pair(evt.base, evt.rel); diff --git a/src/core/atomicdex/services/mm2/mm2.service.hpp b/src/core/atomicdex/services/mm2/mm2.service.hpp index 7a185ce90c..a98f8f1cfc 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.hpp +++ b/src/core/atomicdex/services/mm2/mm2.service.hpp @@ -152,7 +152,7 @@ namespace atomic_dex ~mm2_service() final; //! Events - void on_refresh_orderbook_model_data(const orderbook_refresh& evt); + void on_refresh_orderbook_model_data(const refresh_orderbook_model_data& evt); void on_gui_enter_trading(const gui_enter_trading& evt); @@ -198,6 +198,7 @@ namespace atomic_dex //! Add a new coin in the coin_info cfg add_new_coin(normal_cfg, mm2_cfg) void add_new_coin(const nlohmann::json& coin_cfg_json, const nlohmann::json& raw_coin_cfg_json); void remove_custom_coin(const std::string& ticker); + void update_sync_ticker_pair(std::string base, std::string rel); [[nodiscard]] bool is_this_ticker_present_in_raw_cfg(const std::string& ticker) const; [[nodiscard]] bool is_this_ticker_present_in_normal_cfg(const std::string& ticker) const; [[nodiscard]] bool is_zhtlc_coin_ready(const std::string coin) const; diff --git a/src/tests/atomic.dex.provider.cex.prices.tests.cpp b/src/tests/atomic.dex.provider.cex.prices.tests.cpp index f865a077e3..9bfdf7d983 100644 --- a/src/tests/atomic.dex.provider.cex.prices.tests.cpp +++ b/src/tests/atomic.dex.provider.cex.prices.tests.cpp @@ -50,7 +50,7 @@ TEST_CASE("atomic dex cex prices provider constructor") AND_WHEN("i set the current orderbook pair to a valid supported pair (kmd-btc)") { - registry.ctx().trigger("kmd", "btc"); + registry.ctx().trigger("kmd", "btc"); using namespace std::chrono_literals; cex_system.consume_pending_tasks(); From eb099a1c8cf4376462fe25a5e0d1c46ab8ff6bf8 Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 19 Dec 2023 00:58:57 +0800 Subject: [PATCH 13/43] add note for segwit self pair bug --- src/core/atomicdex/pages/qt.trading.page.cpp | 43 +++++++++++++------- src/core/atomicdex/pages/qt.trading.page.hpp | 2 +- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/core/atomicdex/pages/qt.trading.page.cpp b/src/core/atomicdex/pages/qt.trading.page.cpp index cbcb77bafd..82fad81326 100644 --- a/src/core/atomicdex/pages/qt.trading.page.cpp +++ b/src/core/atomicdex/pages/qt.trading.page.cpp @@ -16,6 +16,7 @@ #include #include +#include //! Project Headers #include "atomicdex/api/mm2/rpc_v1/rpc.buy.hpp" @@ -107,8 +108,13 @@ namespace atomic_dex } void - trading_page::swap_market_pair() + trading_page::swap_market_pair(bool involves_segwit) { + if (involves_segwit) + { + // TODO: Need to resolve this case. It is not clear what to do here, backend overrides are not reflected on the front end as expected. + SPDLOG_DEBUG("swap_market_pair involves_segwit. This is undefined behaviour"); + } const auto* market_selector_mdl = get_market_pairs_mdl(); set_current_orderbook(market_selector_mdl->get_right_selected_coin(), market_selector_mdl->get_left_selected_coin()); } @@ -985,51 +991,60 @@ namespace atomic_dex } bool - trading_page::set_pair(bool is_left_side, const QString& changed_ticker) + trading_page::set_pair(bool is_left_side, const QString& requested_ticker) { - // SPDLOG_DEBUG("Changed ticker: {}", changed_ticker.toStdString()); - const auto* market_pair = get_market_pairs_mdl(); - auto base = market_pair->get_left_selected_coin(); - auto rel = market_pair->get_right_selected_coin(); + // SPDLOG_DEBUG("Changed ticker: {}", requested_ticker.toStdString()); + const auto* market_pair = get_market_pairs_mdl(); + auto base = market_pair->get_left_selected_coin(); + auto rel = market_pair->get_right_selected_coin(); + std::string requested_coin = boost::replace_all_copy(requested_ticker.toStdString(), "-segwit", ""); + std::string base_coin = boost::replace_all_copy(base.toStdString(), "-segwit", ""); + std::string rel_coin = boost::replace_all_copy(rel.toStdString(), "-segwit", ""); + bool involves_segwit = false; + if (requested_coin == base_coin && requested_coin == rel_coin) + { + SPDLOG_DEBUG("Trying to select a segwit self pair. Naughty boy!"); + involves_segwit = true; + } bool is_swap = false; - if (!changed_ticker.isEmpty()) + if (!requested_ticker.isEmpty()) { if (is_left_side) { - if (base == changed_ticker) + if (base == requested_ticker) { return false; } - if (base != changed_ticker && rel == changed_ticker) + if (base != requested_ticker && rel == requested_ticker) { is_swap = true; } else { - base = changed_ticker; + base = requested_ticker; } } else { - if (rel == changed_ticker) + if (rel == requested_ticker) { return false; } - if (rel != changed_ticker && base == changed_ticker) + if (rel != requested_ticker && base == requested_ticker) { is_swap = true; } else { - rel = changed_ticker; + rel = requested_ticker; } } } if (is_swap) { - swap_market_pair(); + swap_market_pair(involves_segwit); base = market_pair->get_left_selected_coin(); rel = market_pair->get_right_selected_coin(); } diff --git a/src/core/atomicdex/pages/qt.trading.page.hpp b/src/core/atomicdex/pages/qt.trading.page.hpp index da067492be..6a6599e328 100644 --- a/src/core/atomicdex/pages/qt.trading.page.hpp +++ b/src/core/atomicdex/pages/qt.trading.page.hpp @@ -155,7 +155,7 @@ namespace atomic_dex Q_INVOKABLE void clear_forms(QString from); //! Trading business - Q_INVOKABLE void swap_market_pair(); ///< market_selector (button to switch market selector and orderbook) + Q_INVOKABLE void swap_market_pair(bool involves_segwit = false); ///< market_selector (button to switch market selector and orderbook) Q_INVOKABLE bool set_pair(bool is_left_side, const QString& changed_ticker); Q_INVOKABLE void set_current_orderbook(const QString& base, const QString& rel); ///< market_selector (called and selecting another coin) From 33c4d4bae57d69ef56dc2b67c3d02bcceb865161 Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 19 Dec 2023 09:56:35 +0800 Subject: [PATCH 14/43] update api --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7333a9351..01d3b3eeb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,13 +60,13 @@ endif () ##! We fetch our dependencies if (APPLE) FetchContent_Declare(mm2 - URL https://sdk.devbuilds.komodo.earth/dev/mm2_6d7d05f-mac-x86-64.zip) + URL https://sdk.devbuilds.komodo.earth/main/mm2_b0fd99e-mac-x86-64.zip) elseif (UNIX AND NOT APPLE) FetchContent_Declare(mm2 - URL https://sdk.devbuilds.komodo.earth/dev/mm2_6d7d05f-linux-x86-64.zip) + URL https://sdk.devbuilds.komodo.earth/main/mm2_b0fd99e-linux-x86-64.zip) else () FetchContent_Declare(mm2 - URL https://sdk.devbuilds.komodo.earth/dev/mm2_6d7d05f-win-x86-64.zip) + URL https://sdk.devbuilds.komodo.earth/main/mm2_b0fd99e-win-x86-64.zip) endif () #FetchContent_Declare(qmaterial URL https://github.com/KomodoPlatform/Qaterial/archive/last-clang-working-2.zip) From d5e19002fbd5c103d01f85b7d82f8ffc5aef25c9 Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 19 Dec 2023 09:57:39 +0800 Subject: [PATCH 15/43] rm logs --- src/core/atomicdex/api/komodo_prices/komodo.prices.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp | 4 ++-- src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp | 4 ++-- src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp | 2 +- .../price/komodo_prices/komodo.prices.provider.cpp | 7 +++---- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/core/atomicdex/api/komodo_prices/komodo.prices.cpp b/src/core/atomicdex/api/komodo_prices/komodo.prices.cpp index d1e95e1d2c..a2282bb4ae 100644 --- a/src/core/atomicdex/api/komodo_prices/komodo.prices.cpp +++ b/src/core/atomicdex/api/komodo_prices/komodo.prices.cpp @@ -79,7 +79,7 @@ namespace atomic_dex::komodo_prices::api { web::http::http_request req; req.set_method(web::http::methods::GET); - std::string endpoint = fallback ? "/api/v2/tickers?expire_at=21600" : "/api/v3/prices/tickers_v2?expire_at=21600"; + std::string endpoint = fallback ? "api/v2/tickers?expire_at=21600" : "api/v3/prices/tickers_v2?expire_at=21600"; if (fallback) { SPDLOG_INFO("url: {}", TO_STD_STR(g_komodo_prices_client_fallback->base_uri().to_string()) + endpoint); diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp index 58483e264e..f41b6c6926 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp @@ -41,9 +41,9 @@ namespace atomic_dex::mm2 { j["swap_contract_address"] = cfg.swap_contract_address.value(); } - if (cfg.fallback_swap_contract_address.has_value()) + if (cfg.fallback_swap_contract.has_value()) { - j["fallback_swap_contract_address"] = cfg.fallback_swap_contract_address.value(); + j["fallback_swap_contract"] = cfg.fallback_swap_contract.value(); } } diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp index 0cbfcff2d7..e977294218 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp @@ -34,7 +34,7 @@ namespace atomic_dex::mm2 bool is_testnet{false}; bool with_tx_history{true}; std::optional swap_contract_address{std::nullopt}; - std::optional fallback_swap_contract_address{std::nullopt}; + std::optional fallback_swap_contract{std::nullopt}; std::optional address_format; std::optional merge_params; std::optional> bchd_urls; diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp index 52a775e424..5db863ad55 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp @@ -61,9 +61,9 @@ namespace atomic_dex::mm2 default: j["urls"] = cfg.urls; j["swap_contract_address"] = cfg.swap_contract_address; - if (cfg.fallback_swap_contract_address.has_value()) + if (cfg.fallback_swap_contract.has_value()) { - j["fallback_swap_contract"] = cfg.fallback_swap_contract_address.value(); + j["fallback_swap_contract"] = cfg.fallback_swap_contract.value(); } break; } diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp index 69170a0341..e5dbf8c4ff 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp @@ -33,7 +33,7 @@ namespace atomic_dex::mm2 CoinType coin_type; bool is_testnet{false}; const std::string swap_contract_address; - std::optional fallback_swap_contract_address{std::nullopt}; + std::optional fallback_swap_contract{std::nullopt}; std::optional matic_gas_station_decimals{9}; std::optional gas_station_url{std::nullopt}; std::optional matic_gas_station_url{std::nullopt}; diff --git a/src/core/atomicdex/services/price/komodo_prices/komodo.prices.provider.cpp b/src/core/atomicdex/services/price/komodo_prices/komodo.prices.provider.cpp index 00945a4400..bc3e5d9203 100644 --- a/src/core/atomicdex/services/price/komodo_prices/komodo.prices.provider.cpp +++ b/src/core/atomicdex/services/price/komodo_prices/komodo.prices.provider.cpp @@ -11,7 +11,7 @@ namespace atomic_dex { komodo_prices_provider::komodo_prices_provider(entt::registry& registry) : system(registry) { - SPDLOG_INFO("komodo_prices_provider created"); + // SPDLOG_INFO("komodo_prices_provider created"); m_clock = std::chrono::high_resolution_clock::now(); process_update(); } @@ -32,8 +32,7 @@ namespace atomic_dex void komodo_prices_provider::process_update(bool fallback) { - SPDLOG_INFO("komodo price service tick loop"); - + // SPDLOG_INFO("komodo price service tick loop"); auto answer_functor = [this, fallback](web::http::http_response resp) { std::string body = TO_STD_STR(resp.extract_string(true).get()); @@ -45,7 +44,7 @@ namespace atomic_dex { std::unique_lock lock(m_market_mutex); m_market_registry = std::move(answer); - SPDLOG_INFO("komodo price registry size: {}", m_market_registry.size()); + // SPDLOG_INFO("komodo price registry size: {}", m_market_registry.size()); } } else From d3e69a28e0fe72f6ac50ce201a91d7303f0f146c Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 19 Dec 2023 09:59:07 +0800 Subject: [PATCH 16/43] rm comments --- src/core/atomicdex/pages/qt.trading.page.cpp | 70 ++++++++++---------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/src/core/atomicdex/pages/qt.trading.page.cpp b/src/core/atomicdex/pages/qt.trading.page.cpp index 82fad81326..59a4e6da78 100644 --- a/src/core/atomicdex/pages/qt.trading.page.cpp +++ b/src/core/atomicdex/pages/qt.trading.page.cpp @@ -84,10 +84,10 @@ namespace atomic_dex } if (bool is_wallet_only = m_system_manager.get_system().get_coin_info(base.toStdString()).wallet_only; is_wallet_only) { - SPDLOG_WARN("{} is wallet only - skipping", base.toStdString()); + // SPDLOG_WARN("{} is wallet only - skipping", base.toStdString()); return; } - SPDLOG_DEBUG("Setting current orderbook: {} / {}", base.toStdString(), rel.toStdString()); + // SPDLOG_DEBUG("Setting current orderbook: {} / {}", base.toStdString(), rel.toStdString()); auto* market_selector_mdl = get_market_pairs_mdl(); const bool to_change = base != market_selector_mdl->get_left_selected_coin() || rel != market_selector_mdl->get_right_selected_coin(); @@ -98,7 +98,7 @@ namespace atomic_dex if (to_change && m_current_trading_mode != TradingModeGadget::Simple) { - SPDLOG_DEBUG("set_current_orderbook"); + // SPDLOG_DEBUG("set_current_orderbook"); this->get_orderbook_wrapper()->clear_orderbook(); this->clear_forms("set_current_orderbook"); } @@ -188,7 +188,7 @@ namespace atomic_dex if (req.is_exact_selected_order_volume) { //! Selected order and we keep the exact volume (Basically swallow the order) - SPDLOG_DEBUG("swallowing the order from the orderbook"); + // SPDLOG_DEBUG("swallowing the order from the orderbook"); req.volume_numer = m_preferred_order->at("base_max_volume_numer").get(); req.volume_denom = m_preferred_order->at("base_max_volume_denom").get(); } @@ -196,14 +196,14 @@ namespace atomic_dex is_max && !req.is_exact_selected_order_volume && m_preferred_order->contains("max_volume_numer") && m_preferred_order->contains("max_volume_denom")) { - SPDLOG_DEBUG("cannot swallow the selected order from the orderbook, use our theoretical max_volume for it"); + // SPDLOG_DEBUG("cannot swallow the selected order from the orderbook, use our theoretical max_volume for it"); //! Selected order but we cannot swallow (not enough funds) set our theoretical max_volume_numer and max_volume_denom req.volume_numer = m_preferred_order->at("max_volume_numer").get(); req.volume_denom = m_preferred_order->at("max_volume_denom").get(); } else { - SPDLOG_DEBUG("Selected order, but changing manually the volume, use input_volume"); + // SPDLOG_DEBUG("Selected order, but changing manually the volume, use input_volume"); req.selected_order_use_input_volume = true; } } @@ -287,10 +287,8 @@ namespace atomic_dex t_float_50 base_min_trade = safe_float(get_orderbook_wrapper()->get_base_min_taker_vol().toStdString()); t_float_50 cur_min_trade = safe_float(get_min_trade_vol().toStdString()); - SPDLOG_DEBUG("base_min_trade: {}, cur_min_trade: {}", base_min_trade.str(), cur_min_trade.str()); - SPDLOG_DEBUG( - "volume: {}, orderbook_available_quantity: {}, is_selected_max: {}", m_volume.toStdString(), orderbook_available_quantity.toStdString(), - is_selected_max); + // SPDLOG_DEBUG("base_min_trade: {}, cur_min_trade: {}", base_min_trade.str(), cur_min_trade.str()); + // SPDLOG_DEBUG("volume: {}, orderbook_available_quantity: {}, is_selected_max: {}", m_volume.toStdString(), orderbook_available_quantity.toStdString(), is_selected_max); t_sell_request req{ .base = base.toStdString(), .rel = rel.toStdString(), @@ -332,14 +330,14 @@ namespace atomic_dex if (t_float_50 base_min_vol_orderbook_f = safe_float(base_min_vol_orderbook); cur_min_trade <= base_min_vol_orderbook_f) { - SPDLOG_DEBUG("The selected order min_vol input is too low, using null field instead"); + // SPDLOG_DEBUG("The selected order min_vol input is too low, using null field instead"); req.min_volume = std::optional{std::nullopt}; } if (req.is_exact_selected_order_volume) { //! Selected order and we keep the exact volume (Basically swallow the order) - SPDLOG_DEBUG("swallowing the order from the orderbook"); + // SPDLOG_DEBUG("swallowing the order from the orderbook"); req.volume_numer = m_preferred_order->at("base_max_volume_numer").get(); req.volume_denom = m_preferred_order->at("base_max_volume_denom").get(); } @@ -347,13 +345,13 @@ namespace atomic_dex ///< let's forbid it in simple ///< view { - SPDLOG_DEBUG("cannot swallow the selected order from the orderbook, use max_taker_volume for it"); + // SPDLOG_DEBUG("cannot swallow the selected order from the orderbook, use max_taker_volume for it"); req.volume_denom = max_taker_vol_json_obj["denom"].toString().toStdString(); req.volume_numer = max_taker_vol_json_obj["numer"].toString().toStdString(); } else { - SPDLOG_DEBUG("Selected order, but changing manually the volume, use input_volume"); + // SPDLOG_DEBUG("Selected order, but changing manually the volume, use input_volume"); req.selected_order_use_input_volume = true; } } @@ -386,7 +384,7 @@ namespace atomic_dex nlohmann::json answer = answers[0]; this->set_buy_sell_last_rpc_data(nlohmann_json_object_to_qt_json_object(answer)); auto& cur_mm2_system = m_system_manager.get_system(); - SPDLOG_DEBUG("order successfully placed, refreshing orders and swap"); + // SPDLOG_DEBUG("order successfully placed, refreshing orders and swap"); cur_mm2_system.batch_fetch_orders_and_swap(); } else @@ -495,8 +493,8 @@ namespace atomic_dex if (!ec) { - SPDLOG_DEBUG("[process_action::post_process_orderbook_finished] Needs reset: {}", m_models_actions[orderbook_need_a_reset]); - SPDLOG_DEBUG(">>>> triggers: {}", m_models_actions[orderbook_need_a_reset] ? "reset_orderbook" : "refresh_orderbook_model_data"); + // SPDLOG_DEBUG("[process_action::post_process_orderbook_finished] Needs reset: {}", m_models_actions[orderbook_need_a_reset]); + // SPDLOG_DEBUG(">>>> triggers: {}", m_models_actions[orderbook_need_a_reset] ? "reset_orderbook" : "refresh_orderbook_model_data"); auto* wrapper = get_orderbook_wrapper(); m_models_actions[orderbook_need_a_reset] ? wrapper->reset_orderbook(result) : wrapper->refresh_orderbook_model_data(result); @@ -616,7 +614,7 @@ namespace atomic_dex if (this->m_market_mode != market_mode) { this->m_market_mode = market_mode; - SPDLOG_DEBUG("switching market_mode, new mode: {}", m_market_mode == MarketMode::Buy ? "buy" : "sell"); + // SPDLOG_DEBUG("switching market_mode, new mode: {}", m_market_mode == MarketMode::Buy ? "buy" : "sell"); this->clear_forms("set_market_mode"); const auto* market_selector_mdl = get_market_pairs_mdl(); set_current_orderbook(market_selector_mdl->get_left_selected_coin(), market_selector_mdl->get_right_selected_coin()); @@ -652,7 +650,7 @@ namespace atomic_dex m_price = std::move(price); if (this->m_preferred_order.has_value() && this->m_preferred_order->contains("locked")) { - SPDLOG_WARN("releasing preferred order because price has been modified"); + // SPDLOG_WARN("releasing preferred order because price has been modified"); this->m_preferred_order = std::nullopt; emit preferredOrderChanged(); } @@ -685,12 +683,12 @@ namespace atomic_dex SPDLOG_WARN("MM2 service not available, required to clear forms - skipping"); return; } - SPDLOG_DEBUG("clearing forms : {}", from.toStdString()); + // SPDLOG_DEBUG("clearing forms : {}", from.toStdString()); if (m_preferred_order.has_value() && m_current_trading_mode == TradingModeGadget::Simple && m_selected_order_status == SelectedOrderGadget::OrderNotExistingAnymore) { - SPDLOG_DEBUG("Simple view cancel order, keeping important data"); + // SPDLOG_DEBUG("Simple view cancel order, keeping important data"); this->set_volume(QString::fromStdString(m_preferred_order->at("initial_input_volume").get())); const auto max_taker_vol = get_orderbook_wrapper()->get_base_max_taker_vol().toJsonObject()["decimal"].toString(); this->set_max_volume(max_taker_vol); @@ -740,7 +738,7 @@ namespace atomic_dex volume = "0"; } m_volume = std::move(volume); - SPDLOG_DEBUG("volume is : [{}]", m_volume.toStdString()); + // SPDLOG_DEBUG("volume is : [{}]", m_volume.toStdString()); this->determine_total_amount(); emit volumeChanged(); @@ -763,7 +761,7 @@ namespace atomic_dex { max_volume = QString::fromStdString(utils::extract_large_float(max_volume.toStdString())); m_max_volume = std::move(max_volume); - SPDLOG_DEBUG("max_volume is [{}]", m_max_volume.toStdString()); + // SPDLOG_DEBUG("max_volume is [{}]", m_max_volume.toStdString()); emit maxVolumeChanged(); } } @@ -793,9 +791,9 @@ namespace atomic_dex { auto available_quantity = m_preferred_order->at("base_max_volume").get(); t_float_50 available_quantity_order = safe_float(available_quantity); - SPDLOG_DEBUG( - "available_quantity_order: {}, max_volume: {}, max_taker_vol: {}", utils::format_float(safe_float(available_quantity)), - get_max_volume().toStdString(), max_taker_vol); + // SPDLOG_DEBUG( + // "available_quantity_order: {}, max_volume: {}, max_taker_vol: {}", utils::format_float(safe_float(available_quantity)), + // get_max_volume().toStdString(), max_taker_vol); if (available_quantity_order < safe_float(max_taker_vol) && !m_preferred_order->at("capped").get()) { max_vol_str = available_quantity; @@ -806,7 +804,7 @@ namespace atomic_dex { if (!m_preferred_order->at("capped").get()) { - SPDLOG_DEBUG("Selected order capping to max_taker_vol because our max_taker_volume is < base_max_volume"); + // SPDLOG_DEBUG("Selected order capping to max_taker_vol because our max_taker_volume is < base_max_volume"); m_preferred_order.value()["capped"] = true; this->set_max_volume(QString::fromStdString(max_vol_str)); } @@ -821,7 +819,7 @@ namespace atomic_dex //! Capping it this->cap_volume(); - SPDLOG_WARN("max_taker_vol this->cap_volume()"); + //SPDLOG_WARN("max_taker_vol this->cap_volume()"); } else { @@ -870,7 +868,7 @@ namespace atomic_dex } } this->cap_volume(); - SPDLOG_WARN("max_taker_vol this->cap_volume()"); + // SPDLOG_WARN("max_taker_vol this->cap_volume()"); } else { @@ -883,7 +881,7 @@ namespace atomic_dex } this->set_max_volume(QString::fromStdString(utils::format_float(res))); this->cap_volume(); - SPDLOG_WARN("max_taker_vol this->cap_volume()"); + // SPDLOG_WARN("max_taker_vol this->cap_volume()"); } } } @@ -902,7 +900,7 @@ namespace atomic_dex { if (!max_volume.isEmpty() && max_volume != "0") { - SPDLOG_DEBUG("capping volume because {} (volume) > {} (max_volume)", std_volume, max_volume.toStdString()); + // SPDLOG_DEBUG("capping volume because {} (volume) > {} (max_volume)", std_volume, max_volume.toStdString()); this->set_volume(get_max_volume()); } } @@ -985,7 +983,7 @@ namespace atomic_dex entity_registry_.template ctx().setValue("DefaultTradingMode", m_current_trading_mode); // get_market_pairs_mdl()->get_left_selection_box()->set_with_fiat_balance(m_current_trading_mode == TradingMode::Simple); get_market_pairs_mdl()->get_left_selection_box()->set_with_balance(m_current_trading_mode == TradingMode::Simple); - SPDLOG_DEBUG("Set trading mode to: {}", QMetaEnum::fromType().valueToKey(trading_mode)); + // SPDLOG_DEBUG("Set trading mode to: {}", QMetaEnum::fromType().valueToKey(trading_mode)); emit tradingModeChanged(); } } @@ -1084,7 +1082,7 @@ namespace atomic_dex { return; } - SPDLOG_DEBUG("preferred_order: {}", preferred_order.dump(-1)); + // SPDLOG_DEBUG("preferred_order: {}", preferred_order.dump(-1)); m_preferred_order = std::move(preferred_order); emit preferredOrderChanged(); if (!m_preferred_order->empty() && m_preferred_order->contains("price")) @@ -1102,7 +1100,7 @@ namespace atomic_dex } else if (this->m_current_trading_mode == TradingModeGadget::Simple && m_preferred_order->contains("initial_input_volume")) { - SPDLOG_DEBUG("From simple view, using initial_input_volume from selection to use."); + // SPDLOG_DEBUG("From simple view, using initial_input_volume from selection to use."); this->set_volume(QString::fromStdString(m_preferred_order->at("initial_input_volume").get())); } this->get_orderbook_wrapper()->refresh_best_orders(); @@ -1220,13 +1218,13 @@ namespace atomic_dex mm2::to_json(preimage_request, req); batch.push_back(preimage_request); preimage_request["userpass"] = "******"; - SPDLOG_DEBUG("trade_preimage request: {}", preimage_request.dump(4)); + // SPDLOG_DEBUG("trade_preimage request: {}", preimage_request.dump(4)); this->set_preimage_busy(true); auto answer_functor = [this, &mm2](web::http::http_response resp) { std::string body = TO_STD_STR(resp.extract_string(true).get()); - SPDLOG_INFO("[determine_fees] trade_preimage answer received: {}", body); + // SPDLOG_INFO("[determine_fees] trade_preimage answer received: {}", body); if (resp.status_code() == web::http::status_codes::OK) { auto answers = nlohmann::json::parse(body); From f89d1247d4a97e253244323f27bf7edc52dbdfa6 Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 19 Dec 2023 19:51:18 +0800 Subject: [PATCH 17/43] tweak logs --- src/app/app.cpp | 10 ++++++++-- src/core/atomicdex/models/qt.orderbook.model.cpp | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/app/app.cpp b/src/app/app.cpp index cb61025c40..2670129757 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -530,9 +530,15 @@ namespace atomic_dex { SPDLOG_DEBUG("on_coin_fully_initialized_event"); #if !defined(_WIN32) - for (auto&& ticker: evt.tickers) { m_portfolio_queue.push(strdup(ticker.c_str())); } + for (auto&& ticker: evt.tickers) { + SPDLOG_DEBUG("Adding {} to m_portfolio_queue", ticker); + m_portfolio_queue.push(strdup(ticker.c_str())); + } #else - for (auto&& ticker: evt.tickers) { m_portfolio_queue.push(_strdup(ticker.c_str())); } + for (auto&& ticker: evt.tickers) { + SPDLOG_DEBUG("Adding {} to m_portfolio_queue", ticker); + m_portfolio_queue.push(_strdup(ticker.c_str())); + } #endif } } diff --git a/src/core/atomicdex/models/qt.orderbook.model.cpp b/src/core/atomicdex/models/qt.orderbook.model.cpp index 95afb9fc9a..01af9c6da3 100644 --- a/src/core/atomicdex/models/qt.orderbook.model.cpp +++ b/src/core/atomicdex/models/qt.orderbook.model.cpp @@ -524,7 +524,7 @@ namespace atomic_dex void orderbook_model::refresh_orderbook_model_data(const t_orders_contents& orderbook, bool is_bestorders) { - SPDLOG_DEBUG("[orderbook_model::refresh_orderbook_model_data], is_bestorders: {}", is_bestorders); + // SPDLOG_DEBUG("[orderbook_model::refresh_orderbook_model_data], is_bestorders: {}", is_bestorders); auto refresh_functor = [this](const std::vector& contents) { for (auto&& order: contents) From 9950a91336cff1077737362fa71c051087af7aba Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 19 Dec 2023 19:51:49 +0800 Subject: [PATCH 18/43] fix fallback_swap_contract variable --- src/core/atomicdex/config/coins.cfg.cpp | 5 +++-- src/core/atomicdex/config/coins.cfg.hpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/atomicdex/config/coins.cfg.cpp b/src/core/atomicdex/config/coins.cfg.cpp index 1ad7f9dbd0..cb0a3982fb 100644 --- a/src/core/atomicdex/config/coins.cfg.cpp +++ b/src/core/atomicdex/config/coins.cfg.cpp @@ -254,10 +254,11 @@ namespace atomic_dex { cfg.swap_contract_address = j["swap_contract_address"]; } - if (j.contains("fallback_swap_contract_address")) + if (j.contains("fallback_swap_contract")) { - cfg.fallback_swap_contract_address = j["fallback_swap_contract_address"]; + cfg.fallback_swap_contract = j["fallback_swap_contract"]; } + // Gas station urls if (j.contains("gas_station_url")) { diff --git a/src/core/atomicdex/config/coins.cfg.hpp b/src/core/atomicdex/config/coins.cfg.hpp index 4da6ea5192..bfeb60ee82 100644 --- a/src/core/atomicdex/config/coins.cfg.hpp +++ b/src/core/atomicdex/config/coins.cfg.hpp @@ -75,7 +75,7 @@ namespace atomic_dex std::optional is_testnet{false}; ///< True if testnet (tBTC, tQTUM, QRC-20 on testnet, tETH) std::optional merge_utxos{false}; std::optional swap_contract_address{std::nullopt}; - std::optional fallback_swap_contract_address{std::nullopt}; + std::optional fallback_swap_contract{std::nullopt}; std::optional gas_station_url{std::nullopt}; std::optional matic_gas_station_url{std::nullopt}; std::optional testnet_matic_gas_station_url{std::nullopt}; From f261c909e6f1a10f14a6c6332dbf07094a6802ad Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 19 Dec 2023 19:52:45 +0800 Subject: [PATCH 19/43] add logs and id in req --- src/core/atomicdex/api/mm2/mm2.client.cpp | 31 ++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/core/atomicdex/api/mm2/mm2.client.cpp b/src/core/atomicdex/api/mm2/mm2.client.cpp index 9393c54ab0..8dceb51cc6 100644 --- a/src/core/atomicdex/api/mm2/mm2.client.cpp +++ b/src/core/atomicdex/api/mm2/mm2.client.cpp @@ -63,6 +63,7 @@ namespace if (Rpc::is_v2) { json_req["mmrpc"] = "2.0"; + json_req["id"] = 42; json_req.push_back({"params", json_data}); } else @@ -76,19 +77,40 @@ namespace template Rpc process_rpc_answer(const web::http::http_response& answer) { - // SPDLOG_DEBUG("rpc answer: {}", TO_STD_STR(answer.extract_string(true).get())); + std::string body = TO_STD_STR(answer.extract_string(true).get()); + SPDLOG_DEBUG("rpc answer: {}", body); + nlohmann::json json_answer; Rpc rpc; - auto json_answer = nlohmann::json::parse(TO_STD_STR(answer.extract_string(true).get())); + try + { + json_answer = nlohmann::json::parse(body); + SPDLOG_DEBUG("rpc answer: {}", json_answer.dump(4)); + } + catch (const nlohmann::json::parse_error& error) + { + SPDLOG_ERROR("rpc answer error: {}", error.what()); + } rpc.raw_result = json_answer.at("result").dump(); + if (Rpc::is_v2) { + SPDLOG_DEBUG("rpc answer: v2"); if (answer.status_code() == 200) + { + SPDLOG_DEBUG("rpc answer: 200"); rpc.result = json_answer.at("result").get(); + } else + { + SPDLOG_DEBUG("rpc answer: error"); rpc.error = json_answer.get(); + } } else + { + SPDLOG_DEBUG("rpc answer: v2"); rpc.result = json_answer.get(); + } return rpc; } } // namespace @@ -165,6 +187,7 @@ namespace atomic_dex::mm2 process_rpc_async(request_type{}, on_rpc_processed); } + // template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); template void mm2_client::process_rpc_async(const std::function&); @@ -188,9 +211,11 @@ namespace atomic_dex::mm2 try { auto rpc = process_rpc_answer(resp); - // SPDLOG_DEBUG("process_rpc_answer rpc.result: {}", rpc.raw_result); + SPDLOG_DEBUG("process_rpc_answer rpc.result: {}", rpc.raw_result); rpc.request = request; + SPDLOG_DEBUG("process_rpc_answer A"); on_rpc_processed(rpc); + SPDLOG_DEBUG("process_rpc_answer B"); } catch (const std::exception& ex) { From 336d5609ba808e4c95441ab2fe274c7ec3f6642e Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 19 Dec 2023 19:53:02 +0800 Subject: [PATCH 20/43] add logs and id in req --- src/core/atomicdex/api/mm2/mm2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/atomicdex/api/mm2/mm2.cpp b/src/core/atomicdex/api/mm2/mm2.cpp index be53b893dc..864cef0b8b 100644 --- a/src/core/atomicdex/api/mm2/mm2.cpp +++ b/src/core/atomicdex/api/mm2/mm2.cpp @@ -584,7 +584,9 @@ namespace atomic_dex::mm2 if (is_protocol_v2) { request["mmrpc"] = "2.0"; + request["id"] = 42; } + SPDLOG_INFO("template_request: {}", request.dump(4)); return request; } From e5547662d5daac414735ae1c516aa494b8533a16 Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 19 Dec 2023 19:53:15 +0800 Subject: [PATCH 21/43] add logs --- src/core/atomicdex/models/qt.portfolio.model.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/atomicdex/models/qt.portfolio.model.cpp b/src/core/atomicdex/models/qt.portfolio.model.cpp index 269cc78546..eb5876fa55 100644 --- a/src/core/atomicdex/models/qt.portfolio.model.cpp +++ b/src/core/atomicdex/models/qt.portfolio.model.cpp @@ -59,21 +59,25 @@ namespace atomic_dex for (auto&& ticker: tickers) { + SPDLOG_INFO("initialize_portfolio for ticker: {}", ticker); if (m_ticker_registry.find(ticker) != m_ticker_registry.end()) + SPDLOG_INFO("ticker {} not in m_ticker_registry", ticker); continue; const auto& mm2_system = this->m_system_manager.get_system(); const auto& price_service = this->m_system_manager.get_system(); const auto& provider = this->m_system_manager.get_system(); auto coin = mm2_system.get_coin_info(ticker); - + SPDLOG_INFO("Building portfolio for ticker {}", coin.ticker); std::error_code ec; + std::string balance = mm2_system.my_balance(coin.ticker, ec); + SPDLOG_INFO("balance for ticker {}: {}", coin.ticker, balance); const QString change_24h = retrieve_change_24h(provider, coin, *m_config, m_system_manager); portfolio_data data{ .ticker = QString::fromStdString(coin.ticker), .gui_ticker = QString::fromStdString(coin.gui_ticker), .coin_type = QString::fromStdString(coin.type), .name = QString::fromStdString(coin.name), - .balance = QString::fromStdString(mm2_system.my_balance(coin.ticker, ec)), + .balance = QString::fromStdString(balance), .main_currency_balance = QString::fromStdString(price_service.get_price_in_fiat(m_config->current_currency, coin.ticker, ec)), .change_24h = change_24h, .main_currency_price_for_one_unit = QString::fromStdString(price_service.get_rate_conversion(m_config->current_currency, coin.ticker, true)), From 62891f4eae61b3c437c9b095b320ab42ab93aac4 Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 19 Dec 2023 21:55:27 +0800 Subject: [PATCH 22/43] tweak logs --- src/core/atomicdex/api/mm2/mm2.cpp | 1 + src/core/atomicdex/models/qt.portfolio.model.cpp | 8 +++++--- src/core/atomicdex/services/exporter/exporter.service.cpp | 1 + .../services/internet/internet.checker.service.cpp | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core/atomicdex/api/mm2/mm2.cpp b/src/core/atomicdex/api/mm2/mm2.cpp index 864cef0b8b..4c801a67a3 100644 --- a/src/core/atomicdex/api/mm2/mm2.cpp +++ b/src/core/atomicdex/api/mm2/mm2.cpp @@ -594,6 +594,7 @@ namespace atomic_dex::mm2 rpc_version() { nlohmann::json json_data = template_request("version"); + SPDLOG_DEBUG("version request {}", json_data.dump(4)); try { auto client = std::make_unique(FROM_STD_STR(atomic_dex::g_dex_rpc)); diff --git a/src/core/atomicdex/models/qt.portfolio.model.cpp b/src/core/atomicdex/models/qt.portfolio.model.cpp index eb5876fa55..13f2f2a04e 100644 --- a/src/core/atomicdex/models/qt.portfolio.model.cpp +++ b/src/core/atomicdex/models/qt.portfolio.model.cpp @@ -59,10 +59,12 @@ namespace atomic_dex for (auto&& ticker: tickers) { - SPDLOG_INFO("initialize_portfolio for ticker: {}", ticker); if (m_ticker_registry.find(ticker) != m_ticker_registry.end()) + { SPDLOG_INFO("ticker {} not in m_ticker_registry", ticker); continue; + } + SPDLOG_INFO("initialize_portfolio for ticker: {}", ticker); const auto& mm2_system = this->m_system_manager.get_system(); const auto& price_service = this->m_system_manager.get_system(); const auto& provider = this->m_system_manager.get_system(); @@ -118,7 +120,7 @@ namespace atomic_dex { if (m_ticker_registry.find(coin.ticker) == m_ticker_registry.end()) { - SPDLOG_WARN("ticker: {} not inserted yet in the model, skipping", coin.ticker); + SPDLOG_WARN("[update_currency_values] ticker: {} not inserted yet in the model, skipping", coin.ticker); return false; } const std::string& ticker = coin.ticker; @@ -154,7 +156,7 @@ namespace atomic_dex auto coin_info = mm2_system.get_coin_info(ticker); QJsonObject status = nlohmann_json_object_to_qt_json_object(coin_info.activation_status); update_value(ActivationStatus, status, idx, *this); - // SPDLOG_DEBUG("updated currency values of: {}", ticker); + SPDLOG_DEBUG("updated currency values of: {}", ticker); } } return true; diff --git a/src/core/atomicdex/services/exporter/exporter.service.cpp b/src/core/atomicdex/services/exporter/exporter.service.cpp index 6f59fcd42c..123847dd6d 100644 --- a/src/core/atomicdex/services/exporter/exporter.service.cpp +++ b/src/core/atomicdex/services/exporter/exporter.service.cpp @@ -78,6 +78,7 @@ namespace atomic_dex .to_timestamp = swaps_data.filtering_infos.to_timestamp}; to_json(my_recent_swaps, request); batch.push_back(my_recent_swaps); + // SPDLOG_INFO("my_recent_swaps req: {}", my_recent_swaps.dump(4)); auto answer_functor = [csv_path](web::http::http_response resp) { auto answers = mm2::basic_batch_answer(resp); diff --git a/src/core/atomicdex/services/internet/internet.checker.service.cpp b/src/core/atomicdex/services/internet/internet.checker.service.cpp index b346ac2853..60c1b0f378 100644 --- a/src/core/atomicdex/services/internet/internet.checker.service.cpp +++ b/src/core/atomicdex/services/internet/internet.checker.service.cpp @@ -173,6 +173,7 @@ namespace atomic_dex SPDLOG_INFO("mm2 is alive, checking if we are able to fetch mm2 version"); nlohmann::json batch = nlohmann::json::array(); nlohmann::json current_request = mm2::template_request("version"); + // SPDLOG_DEBUG("version request {}", current_request.dump(4)); batch.push_back(current_request); auto async_answer = mm2.get_mm2_client().async_rpc_batch_standalone(batch); generic_treat_answer(async_answer, TO_STD_STR(atomic_dex::g_dex_rpc), &internet_service_checker::is_mm2_endpoint_alive); From 00f95b3ea77c362921c499803c3c808238ae08fc Mon Sep 17 00:00:00 2001 From: smk762 Date: Tue, 19 Dec 2023 22:37:15 +0800 Subject: [PATCH 23/43] update default coins --- cmake/project.metadata.cmake | 2 +- src/core/atomicdex/constants/dex.constants.hpp | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/cmake/project.metadata.cmake b/cmake/project.metadata.cmake index 848aaf55eb..e871d5b5e3 100644 --- a/cmake/project.metadata.cmake +++ b/cmake/project.metadata.cmake @@ -11,7 +11,7 @@ set(DEX_VERSION "0.7.0") set(DEX_SUPPORT_PAGE "https://support.komodoplatform.com/support/home") set(DEX_DISCORD "https://komodoplatform.com/discord") set(DEX_TWITTER "https://twitter.com/AtomicDEX") -set(DEX_PRIMARY_COIN "LTC") ## Main coin of the DEX, will be enabled by default and will be the default left ticker for trading +set(DEX_PRIMARY_COIN "LTC-segwit") ## Main coin of the DEX, will be enabled by default and will be the default left ticker for trading set(DEX_SECOND_PRIMARY_COIN "KMD") ## Second main coin of the DEX, will be enabled by default and will be the default right ticker for trading set(DEX_REPOSITORY_OWNER ${DEX_COMPANY}) set(DEX_REPOSITORY_NAME "komodo-wallet-desktop") diff --git a/src/core/atomicdex/constants/dex.constants.hpp b/src/core/atomicdex/constants/dex.constants.hpp index e399e89a06..350793b461 100644 --- a/src/core/atomicdex/constants/dex.constants.hpp +++ b/src/core/atomicdex/constants/dex.constants.hpp @@ -11,14 +11,11 @@ namespace atomic_dex g_primary_dex_coin, g_second_primary_dex_coin, "BTC-segwit", - "LTC-segwit", "DGB-segwit", }; inline const std::vector g_faucet_coins{ "DOC", "MARTY", - "RICK", - "MORTY", "ZOMBIE", }; inline const std::vector g_wallet_only_coins{ @@ -27,17 +24,6 @@ namespace atomic_dex "NVC", "PAXG-ERC20", "USDT-ERC20", - "BET", - "BOTS", - "CRYPTO", - "DEX", - "HODL", - "JUMBLR", - "MGW", - "MSHARK", - "PANGEA", - "REVS", - "SUPERNET", "XPM", "VOTE2023", "ATOM" From 5873a669b6e60ad77754d88195413b42a6449cda Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 09:28:08 +0800 Subject: [PATCH 24/43] twaek logs --- src/app/app.cpp | 2 ++ src/core/atomicdex/api/mm2/mm2.client.cpp | 23 +++++++++++-------- src/core/atomicdex/api/mm2/mm2.cpp | 5 ++-- .../atomicdex/models/qt.orderbook.model.cpp | 2 +- .../atomicdex/models/qt.portfolio.model.cpp | 6 +++-- src/core/atomicdex/pages/qt.wallet.page.cpp | 2 ++ .../services/price/global.provider.cpp | 5 +++- 7 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/app/app.cpp b/src/app/app.cpp index 2670129757..d3dee68e4e 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -563,6 +563,7 @@ namespace atomic_dex QString application::get_balance(const QString& coin) { std::error_code ec; + SPDLOG_DEBUG("{} l{}", __FUNCTION__, __LINE__); auto res = get_mm2().my_balance(coin.toStdString(), ec); return QString::fromStdString(res); } @@ -573,6 +574,7 @@ namespace atomic_dex system_manager_.get_system().set_status("enabling_coins"); } + // Function appears to be unused. void application::refresh_orders_and_swaps() { auto& mm2 = get_mm2(); diff --git a/src/core/atomicdex/api/mm2/mm2.client.cpp b/src/core/atomicdex/api/mm2/mm2.client.cpp index 8dceb51cc6..26119feecf 100644 --- a/src/core/atomicdex/api/mm2/mm2.client.cpp +++ b/src/core/atomicdex/api/mm2/mm2.client.cpp @@ -78,37 +78,44 @@ namespace Rpc process_rpc_answer(const web::http::http_response& answer) { std::string body = TO_STD_STR(answer.extract_string(true).get()); + if (body.size() > 1000) + { + SPDLOG_DEBUG("redacted rpc answer: {}", body.substr(0, 1000)); + } + else + { + SPDLOG_DEBUG("rpc answer: {}", body); + } SPDLOG_DEBUG("rpc answer: {}", body); nlohmann::json json_answer; Rpc rpc; try { json_answer = nlohmann::json::parse(body); - SPDLOG_DEBUG("rpc answer: {}", json_answer.dump(4)); + // SPDLOG_DEBUG("rpc answer: {}", json_answer.dump(4)); } catch (const nlohmann::json::parse_error& error) { SPDLOG_ERROR("rpc answer error: {}", error.what()); } - rpc.raw_result = json_answer.at("result").dump(); if (Rpc::is_v2) { - SPDLOG_DEBUG("rpc answer: v2"); if (answer.status_code() == 200) { - SPDLOG_DEBUG("rpc answer: 200"); rpc.result = json_answer.at("result").get(); + rpc.raw_result = json_answer.at("result").dump(); } else { - SPDLOG_DEBUG("rpc answer: error"); + SPDLOG_DEBUG("rpc2 answer: error"); rpc.error = json_answer.get(); + rpc.raw_result = json_answer.dump(); + SPDLOG_DEBUG("rpc.raw_result: {}", rpc.raw_result); } } else { - SPDLOG_DEBUG("rpc answer: v2"); rpc.result = json_answer.get(); } return rpc; @@ -211,14 +218,12 @@ namespace atomic_dex::mm2 try { auto rpc = process_rpc_answer(resp); - SPDLOG_DEBUG("process_rpc_answer rpc.result: {}", rpc.raw_result); rpc.request = request; - SPDLOG_DEBUG("process_rpc_answer A"); on_rpc_processed(rpc); - SPDLOG_DEBUG("process_rpc_answer B"); } catch (const std::exception& ex) { + // SPDLOG_DEBUG("process_rpc_answer rpc.result: {}", rpc.raw_result); SPDLOG_ERROR(ex.what()); } }); diff --git a/src/core/atomicdex/api/mm2/mm2.cpp b/src/core/atomicdex/api/mm2/mm2.cpp index 4c801a67a3..cffd3b1b43 100644 --- a/src/core/atomicdex/api/mm2/mm2.cpp +++ b/src/core/atomicdex/api/mm2/mm2.cpp @@ -586,7 +586,8 @@ namespace atomic_dex::mm2 request["mmrpc"] = "2.0"; request["id"] = 42; } - SPDLOG_INFO("template_request: {}", request.dump(4)); + // SPDLOG_INFO("template_request: {}", request.dump(4)); + return request; } @@ -594,7 +595,7 @@ namespace atomic_dex::mm2 rpc_version() { nlohmann::json json_data = template_request("version"); - SPDLOG_DEBUG("version request {}", json_data.dump(4)); + // SPDLOG_DEBUG("version request {}", json_data.dump(4)); try { auto client = std::make_unique(FROM_STD_STR(atomic_dex::g_dex_rpc)); diff --git a/src/core/atomicdex/models/qt.orderbook.model.cpp b/src/core/atomicdex/models/qt.orderbook.model.cpp index 01af9c6da3..da39538c5e 100644 --- a/src/core/atomicdex/models/qt.orderbook.model.cpp +++ b/src/core/atomicdex/models/qt.orderbook.model.cpp @@ -364,7 +364,7 @@ namespace atomic_dex void orderbook_model::reset_orderbook(const t_orders_contents& orderbook, bool is_bestorders) { - SPDLOG_DEBUG("[orderbook_model::reset_orderbook], is_bestorders: {}", is_bestorders); + // SPDLOG_DEBUG("[orderbook_model::reset_orderbook], is_bestorders: {}", is_bestorders); if (!orderbook.empty()) { SPDLOG_INFO( diff --git a/src/core/atomicdex/models/qt.portfolio.model.cpp b/src/core/atomicdex/models/qt.portfolio.model.cpp index 13f2f2a04e..d76c129977 100644 --- a/src/core/atomicdex/models/qt.portfolio.model.cpp +++ b/src/core/atomicdex/models/qt.portfolio.model.cpp @@ -127,6 +127,7 @@ namespace atomic_dex if (const auto res = this->match(this->index(0, 0), TickerRole, QString::fromStdString(ticker), 1, Qt::MatchFlag::MatchExactly); not res.isEmpty()) { + // SPDLOG_INFO("[update_currency_values] for ticker: {}", coin.ticker); std::error_code ec; const QModelIndex& idx = res.at(0); const QString main_currency_balance_value = QString::fromStdString(price_service.get_price_in_fiat(currency, ticker, ec)); @@ -156,7 +157,7 @@ namespace atomic_dex auto coin_info = mm2_system.get_coin_info(ticker); QJsonObject status = nlohmann_json_object_to_qt_json_object(coin_info.activation_status); update_value(ActivationStatus, status, idx, *this); - SPDLOG_DEBUG("updated currency values of: {}", ticker); + // SPDLOG_DEBUG("updated currency values of: {}", ticker); } } return true; @@ -177,9 +178,10 @@ namespace atomic_dex SPDLOG_WARN("ticker: {} not inserted yet in the model, skipping", ticker); return false; } - // SPDLOG_DEBUG("trying updating balance values of: {}", ticker); + if (const auto res = this->match(this->index(0, 0), TickerRole, QString::fromStdString(ticker), 1, Qt::MatchFlag::MatchExactly); not res.isEmpty()) { + // SPDLOG_DEBUG("Updating balance values of: {}", ticker); const auto& mm2_system = this->m_system_manager.get_system(); const auto* global_cfg = this->m_system_manager.get_system().get_global_cfg(); const auto coin = global_cfg->get_coin_info(ticker); diff --git a/src/core/atomicdex/pages/qt.wallet.page.cpp b/src/core/atomicdex/pages/qt.wallet.page.cpp index dc299a6a86..fc78130154 100644 --- a/src/core/atomicdex/pages/qt.wallet.page.cpp +++ b/src/core/atomicdex/pages/qt.wallet.page.cpp @@ -59,6 +59,7 @@ namespace atomic_dex void wallet_page::check_send_availability() { + // SPDLOG_DEBUG("check_send_availability"); auto& mm2 = m_system_manager.get_system(); auto global_coins_cfg = m_system_manager.get_system().get_global_cfg(); auto ticker_info = global_coins_cfg->get_coin_info(mm2.get_current_ticker()); @@ -274,6 +275,7 @@ namespace atomic_dex auto& mm2_system = m_system_manager.get_system(); if (mm2_system.is_mm2_running()) { + SPDLOG_DEBUG("get_ticker_infos for {} wallet page", mm2_system.get_current_ticker()); auto& price_service = m_system_manager.get_system(); const auto& settings_system = m_system_manager.get_system(); const auto& provider = m_system_manager.get_system(); diff --git a/src/core/atomicdex/services/price/global.provider.cpp b/src/core/atomicdex/services/price/global.provider.cpp index 09bdf2d438..75ec404bbf 100644 --- a/src/core/atomicdex/services/price/global.provider.cpp +++ b/src/core/atomicdex/services/price/global.provider.cpp @@ -334,6 +334,9 @@ namespace atomic_dex std::string global_price_service::get_price_in_fiat(const std::string& fiat, const std::string& ticker, std::error_code& ec, bool skip_precision) const { + // Runs often to update fiat values for all enabled coins. + // fetch ticker infos loop and on_update_portfolio_values_event triggers this. + // SPDLOG_INFO("get_price_in_fiat [{}] [{}]", fiat, ticker); try { auto& mm2_instance = m_system_manager.get_system(); @@ -352,7 +355,7 @@ namespace atomic_dex } std::error_code t_ec; - const auto amount = mm2_instance.my_balance(ticker, t_ec); + const auto amount = mm2_instance.my_balance(ticker, t_ec); // from registry if (t_ec) { From 306b8db04a4d23bb2d6d83338b473e6dcefd046b Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 09:29:33 +0800 Subject: [PATCH 25/43] add queued activation --- .../rpc_v2/rpc2.enable_eth_with_tokens.cpp | 13 +- .../rpc_v2/rpc2.enable_eth_with_tokens.hpp | 1 + src/core/atomicdex/pages/qt.trading.page.cpp | 1 + .../atomicdex/services/mm2/mm2.service.cpp | 339 ++++++++++++------ .../atomicdex/services/mm2/mm2.service.hpp | 5 +- 5 files changed, 244 insertions(+), 115 deletions(-) diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.cpp index 6d1ab8916f..2a0bb73211 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.cpp @@ -9,21 +9,16 @@ namespace atomic_dex::mm2 j["ticker"] = in.ticker; j["nodes"] = in.nodes; j["tx_history"] = in.tx_history; + j["get_balances"] = in.get_balances; j["erc20_tokens_requests"] = in.erc20_tokens_requests; if (in.required_confirmations.has_value()) j["required_confirmations"] = in.required_confirmations.value(); if (in.requires_notarization.has_value()) j["requires_notarization"] = in.requires_notarization.value(); + j["swap_contract_address"] = in.swap_contract_address; + j["fallback_swap_contract"] = in.fallback_swap_contract; - // Use this in mm2.service.cpp when constructing the request - // - // coin_config coin_info = get_coin_info(in.ticker); - // coin_config.fallback_swap_contract_address - // coin_config.swap_contract_address - // coin_config.gas_station_url - // coin_config.gas_station_decimals - - // SPDLOG_DEBUG("enable_erc20_with_tokens: {}", j.dump(4)); + SPDLOG_DEBUG("enable_eth_with_tokens: {}", j.dump(4)); } void to_json(nlohmann::json& j, const enable_eth_with_tokens_request_rpc::erc20_token_request_t& in) diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp index f9f3c358ee..9205777d8d 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_eth_with_tokens.hpp @@ -44,6 +44,7 @@ namespace atomic_dex::mm2 std::string swap_contract_address; std::string fallback_swap_contract; bool tx_history{true}; + bool get_balances{true}; std::optional is_testnet{false}; std::optional gas_station_decimals; std::optional required_confirmations; diff --git a/src/core/atomicdex/pages/qt.trading.page.cpp b/src/core/atomicdex/pages/qt.trading.page.cpp index 59a4e6da78..8489fc22f4 100644 --- a/src/core/atomicdex/pages/qt.trading.page.cpp +++ b/src/core/atomicdex/pages/qt.trading.page.cpp @@ -1280,6 +1280,7 @@ namespace atomic_dex void trading_page::determine_error_cases() { + // SPDLOG_DEBUG("determine_error_cases"); if (!m_system_manager.has_system()) return; TradingError current_trading_error = TradingError::None; diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index 6f358de133..ee6c4c33fc 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -129,6 +129,11 @@ namespace } } + void mm2_service::update_coin_active(const std::vector& tickers, bool status) + { + update_coin_status(this->m_current_wallet_name, tickers, status, m_coins_informations, m_coin_cfg_mutex); + } + void update_coin_status(const std::string& wallet_name, const std::vector& tickers, bool status, atomic_dex::t_coins_registry& registry, std::shared_mutex& registry_mtx, std::string field_name = "active") { @@ -156,10 +161,12 @@ namespace { if (registry[ticker].is_custom_coin) { + SPDLOG_DEBUG("Setting custom ticker: {} field {} to {}", ticker, field_name, status); custom_cfg_data.at(ticker)[field_name] = status; } else { + SPDLOG_DEBUG("Setting ticker: {} field {} to {}", ticker, field_name, status); config_json_data.at(ticker)[field_name] = status; } if (field_name == "active") @@ -281,14 +288,20 @@ namespace atomic_dex return; } - const auto now = std::chrono::high_resolution_clock::now(); - const auto s = std::chrono::duration_cast(now - m_orderbook_clock); - const auto s_info = std::chrono::duration_cast(now - m_info_clock); + const auto now = std::chrono::high_resolution_clock::now(); + const auto s_orderbook = std::chrono::duration_cast(now - m_orderbook_clock); + const auto s_info = std::chrono::duration_cast(now - m_info_clock); + const auto s_activation = std::chrono::duration_cast(now - m_activation_clock); - if (s >= 5s) + if (s_orderbook >= 5s) + { + fetch_current_orderbook_thread(false); // process_orderbook (not a reset) if on trading page + batch_fetch_orders_and_swap(); // gets 'my_orders', 'my_recent_swaps' & 'active_swaps' + m_orderbook_clock = std::chrono::high_resolution_clock::now(); + } + + if (s_activation >= 7s) { - SPDLOG_DEBUG("coin_status_update required, {}", m_nb_update_required); - auto coins = this->get_enabled_coins(); std::vector tickers; for (auto&& coin: coins) @@ -298,20 +311,35 @@ namespace atomic_dex tickers.push_back(coin.ticker); } } - SPDLOG_DEBUG("Making sure {} enabled coins are marked as active", tickers.size()); if (!tickers.empty()) { // Mark coins as active internally, and updates the coins file + SPDLOG_DEBUG("Making sure {} enabled coins are marked as active", tickers.size()); update_coin_status(this->m_current_wallet_name, tickers, true, m_coins_informations, m_coin_cfg_mutex); } - fetch_current_orderbook_thread(false); // process_orderbook (not a reset) if on trading page - batch_fetch_orders_and_swap(); // gets 'my_orders', 'my_recent_swaps' & 'active_swaps' - m_orderbook_clock = std::chrono::high_resolution_clock::now(); + + if (!m_activation_queue.empty()) + { + std::unique_lock lock(m_activation_mutex); + SPDLOG_DEBUG("Activating {} coins from activation queue", m_activation_queue.size()); + t_coins to_enable; + + for (size_t i = 0; i < 20 && i < m_activation_queue.size(); ++i) { + SPDLOG_DEBUG("Activating {} coins from activation queue", m_activation_queue.size()); + to_enable.push_back(m_activation_queue[i]); + } + activate_coins(to_enable); + m_activation_queue.erase(m_activation_queue.begin(), m_activation_queue.begin() + to_enable.size()); + } + else { + SPDLOG_DEBUG("No coins left in activation queue!"); + } + m_activation_clock = std::chrono::high_resolution_clock::now(); } - if (s_info >= 30s) + if (s_info >= 29s) { - fetch_infos_thread(); + fetch_infos_thread(); // leads to batch_balance_and_tx m_info_clock = std::chrono::high_resolution_clock::now(); } } @@ -415,7 +443,7 @@ namespace atomic_dex { t_enable_z_coin_cancel_request request{.task_id = task_id}; auto answer = m_mm2_client.rpc_enable_z_coin_cancel(std::move(request)); - SPDLOG_DEBUG("mm2_service::enable_z_coin_cancel: [task_id {}] result: {}", task_id, answer.raw_result); + // SPDLOG_DEBUG("mm2_service::enable_z_coin_cancel: [task_id {}] result: {}", task_id, answer.raw_result); } bool mm2_service::disable_coin(const std::string& ticker, std::error_code& ec) @@ -423,14 +451,14 @@ namespace atomic_dex coin_config coin_info = get_coin_info(ticker); if (not coin_info.currently_enabled) { - SPDLOG_DEBUG("[mm2_service::disable_coin]: {} not currently_enabled", ticker); + // SPDLOG_DEBUG("[mm2_service::disable_coin]: {} not currently_enabled", ticker); return true; } t_disable_coin_request request{.coin = ticker}; auto answer = m_mm2_client.rpc_disable_coin(std::move(request)); - SPDLOG_DEBUG("mm2_service::disable_coin: {} result: {}", ticker, answer.raw_result); + // SPDLOG_DEBUG("mm2_service::disable_coin: {} result: {}", ticker, answer.raw_result); if (answer.error.has_value()) { @@ -467,7 +495,6 @@ namespace atomic_dex auto coins = get_active_coins(); enable_coins(coins); - batch_fetch_orders_and_swap(); this->dispatcher_.trigger(); return result.load() == 1; } @@ -495,6 +522,21 @@ namespace atomic_dex } void mm2_service::enable_coins(const t_coins& coins) + { + t_coins enabled_coins = get_enabled_coins(); + for (const auto& coin : coins) + { + if (std::ranges::any_of(enabled_coins, [&coin](const auto& enabled_coin) { return enabled_coin.ticker == coin.ticker; })) + { + SPDLOG_WARN("{} cannot be enabled because it already is or is being enabled.", coin.ticker); + continue; + } + std::unique_lock lock(m_activation_mutex); + m_activation_queue.push_back(coin); + } + } + + void mm2_service::activate_coins(const t_coins& coins) { t_coins other_coins; t_coins erc_family_coins; @@ -504,94 +546,123 @@ namespace atomic_dex t_coins osmosis_coins; t_coins iris_coins; t_coins cosmos_coins; - - for (const auto& coin_config : coins) + t_coins bep20_coins; + t_coins bep20_testnet_coins; + + SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", coins.size()); + for (const auto& coin_cfg : coins) { - if (coin_config.currently_enabled) + + if (coin_cfg.currently_enabled) { - SPDLOG_WARN("{} cannot be enabled because it already is or being enabled.", coin_config.ticker); + SPDLOG_WARN("{} cannot be enabled because it already is or is being enabled.", coin_cfg.ticker); + continue; } - else if (coin_config.coin_type == CoinType::SLP || (coin_config.other_types && coin_config.other_types->contains(CoinType::SLP))) + SPDLOG_INFO("Preparing {} for activation", coin_cfg.ticker); + if (coin_cfg.coin_type == CoinType::SLP || (coin_cfg.other_types && coin_cfg.other_types->contains(CoinType::SLP))) { - if (coin_config.is_testnet.value_or(false)) + if (coin_cfg.is_testnet.value_or(false)) { - slp_testnet_coins.push_back(coin_config); + slp_testnet_coins.push_back(coin_cfg); } else { - slp_coins.push_back(coin_config); + slp_coins.push_back(coin_cfg); } } - else if (coin_config.coin_type == CoinType::TENDERMINT || coin_config.coin_type == CoinType::TENDERMINTTOKEN) + else if (coin_cfg.coin_type == CoinType::TENDERMINT || coin_cfg.coin_type == CoinType::TENDERMINTTOKEN) { - if (coin_config.parent_coin == "ATOM") + if (coin_cfg.parent_coin == "ATOM") { - cosmos_coins.push_back(coin_config); + cosmos_coins.push_back(coin_cfg); } - else if (coin_config.parent_coin == "IRIS") + else if (coin_cfg.parent_coin == "IRIS") { - iris_coins.push_back(coin_config); + iris_coins.push_back(coin_cfg); } - else if (coin_config.parent_coin == "OSMO") + else if (coin_cfg.parent_coin == "OSMO") { - osmosis_coins.push_back(coin_config); + osmosis_coins.push_back(coin_cfg); } else { - SPDLOG_WARN("Unexpected Tendermint ticker: {}", coin_config.ticker); - SPDLOG_WARN("Parent coin: {}", coin_config.parent_coin); + SPDLOG_WARN("Unexpected Tendermint ticker: {}", coin_cfg.ticker); + SPDLOG_WARN("Parent coin: {}", coin_cfg.parent_coin); } } - else if (coin_config.coin_type == CoinType::ZHTLC) + else if (coin_cfg.coin_type == CoinType::ZHTLC) { - zhtlc_coins.push_back(coin_config); + zhtlc_coins.push_back(coin_cfg); } - else if (coin_config.is_erc_family) + else if (coin_cfg.coin_type == CoinType::BEP20) { - erc_family_coins.push_back(coin_config); + // coin_cfg.is_testnet.value_or(false) ? bep20_testnet_coins.push_back(coin_cfg) : bep20_coins.push_back(coin_cfg); + erc_family_coins.push_back(coin_cfg); + } + else if (coin_cfg.is_erc_family) + { + erc_family_coins.push_back(coin_cfg); } else { - other_coins.push_back(coin_config); + other_coins.push_back(coin_cfg); } } if (other_coins.size() > 0) { + SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} utxo_qrc20_coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", other_coins.size()); enable_utxo_qrc20_coins(other_coins); } + if (bep20_coins.size() > 0) + { + SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} BEP20 coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", bep20_coins.size()); + enable_erc20_coins(bep20_coins, "BNB"); + } + if (bep20_testnet_coins.size() > 0) + { + SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} bep20_testnet_coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", bep20_testnet_coins.size()); + enable_erc20_coins(bep20_testnet_coins, "BNBT"); + } if (erc_family_coins.size() > 0) { + SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} erc_family_coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", erc_family_coins.size()); enable_erc_family_coins(erc_family_coins); } if (slp_coins.size() > 0) { + SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} slp_coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", slp_coins.size()); enable_slp_coins(slp_coins); } if (slp_testnet_coins.size() > 0) { + SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} slp_testnet_coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", slp_testnet_coins.size()); enable_slp_testnet_coins(slp_testnet_coins); } if (zhtlc_coins.size() > 0) { + SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} zhtlc_coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", zhtlc_coins.size()); enable_zhtlc(zhtlc_coins); } if (iris_coins.size() > 0) { + SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} iris_coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", iris_coins.size()); enable_tendermint_coins(iris_coins, "IRIS"); } if (cosmos_coins.size() > 0) { + SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} cosmos_coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", cosmos_coins.size()); enable_tendermint_coins(cosmos_coins, "ATOM"); } if (osmosis_coins.size() > 0) { + SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} osmosis_coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", osmosis_coins.size()); enable_tendermint_coins(osmosis_coins, "OSMO"); } } - void mm2_service::enable_erc_family_coin(const coin_config& coin_config) + void mm2_service::enable_erc_family_coin(const coin_config& coin_cfg) { - enable_erc_family_coins(t_coins{coin_config}); + enable_erc_family_coins(t_coins{coin_cfg}); } void mm2_service::enable_erc_family_coins(const t_coins& coins) @@ -639,6 +710,8 @@ namespace atomic_dex std::vector tickers; for (auto&& coin: activated_coins) { + + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[coin.ticker].currently_enabled = true; tickers.push_back(coin.ticker); fetch_single_balance(coin); @@ -648,6 +721,7 @@ namespace atomic_dex std::vector failed_tickers; for (auto&& coin: failed_coins) { + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[coin.ticker].currently_enabled = false; failed_tickers.push_back(coin.ticker); } @@ -659,7 +733,6 @@ namespace atomic_dex { SPDLOG_ERROR(error.what()); } - this->m_nb_update_required += 1; }; for (const auto& coin_config : coins) @@ -673,9 +746,9 @@ namespace atomic_dex .swap_contract_address = coin_config.swap_contract_address.value_or(""), .with_tx_history = false }; - if (coin_config.fallback_swap_contract_address.value_or("") != "") + if (coin_config.fallback_swap_contract.value_or("") != "") { - request.fallback_swap_contract_address = coin_config.fallback_swap_contract_address; + request.fallback_swap_contract = coin_config.fallback_swap_contract; } nlohmann::json j = mm2::template_request("enable"); mm2::to_json(j, request); @@ -691,10 +764,6 @@ namespace atomic_dex enable_utxo_qrc20_coins(t_coins{std::move(coin_config)}); } - void mm2_service::update_coin_active(const std::vector& tickers, bool status) - { - update_coin_status(this->m_current_wallet_name, tickers, status, m_coins_informations, m_coin_cfg_mutex); - } void mm2_service::enable_utxo_qrc20_coins(const t_coins& coins) { @@ -742,6 +811,7 @@ namespace atomic_dex std::vector tickers; for (auto&& coin: activated_coins) { + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[coin.ticker].currently_enabled = true; tickers.push_back(coin.ticker); fetch_single_balance(coin); @@ -751,6 +821,7 @@ namespace atomic_dex std::vector failed_tickers; for (auto&& coin: failed_coins) { + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[coin.ticker].currently_enabled = false; failed_tickers.push_back(coin.ticker); } @@ -762,7 +833,6 @@ namespace atomic_dex { SPDLOG_ERROR(error.what()); } - this->m_nb_update_required += 1; }; for (const auto& coin_config : coins) @@ -788,9 +858,9 @@ namespace atomic_dex { request.swap_contract_address = coin_config.swap_contract_address; } - if (coin_config.fallback_swap_contract_address.value_or("") != "") + if (coin_config.fallback_swap_contract.value_or("") != "") { - request.fallback_swap_contract_address = coin_config.fallback_swap_contract_address; + request.fallback_swap_contract = coin_config.fallback_swap_contract; } mm2::to_json(j, request); batch_array.push_back(j); @@ -808,31 +878,40 @@ namespace atomic_dex void mm2_service::enable_erc20_coins(const t_coins& coins, const std::string parent_ticker) { - SPDLOG_INFO("Parent ticker: {}", parent_ticker); auto callback = [this](RpcRequest rpc) { if (rpc.error) { SPDLOG_ERROR("{} {}: ", rpc.request.ticker, rpc.error->error_type); - if (rpc.error->error_type.find("PlatformIsAlreadyActivated") != std::string::npos || rpc.error->error_type.find("TokenIsAlreadyActivated") != std::string::npos) + if (rpc.error->error_type.find("PlatformIsAlreadyActivated") != std::string::npos) { SPDLOG_ERROR("{} {}: ", rpc.request.ticker, rpc.error->error_type); fetch_single_balance(get_coin_info(rpc.request.ticker)); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[rpc.request.ticker].currently_enabled = true; dispatcher_.trigger(coin_fully_initialized{.tickers = {rpc.request.ticker}}); if constexpr (std::is_same_v) { + SPDLOG_ERROR("{} {}: ", rpc.request.ticker, rpc.error->error_type); + for (const auto& erc20_coin_info : rpc.request.erc20_tokens_requests) { SPDLOG_ERROR("{} {}: ", erc20_coin_info.ticker, rpc.error->error_type); fetch_single_balance(get_coin_info(erc20_coin_info.ticker)); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[erc20_coin_info.ticker].currently_enabled = true; dispatcher_.trigger(coin_fully_initialized{.tickers = {erc20_coin_info.ticker}}); } } } + else if (rpc.error->error_type.find("TokenIsAlreadyActivated") != std::string::npos) + { + SPDLOG_ERROR("{} {}: ", rpc.request.ticker, rpc.error->error_type); + } else { + SPDLOG_ERROR("marking {} as inactive: {}", rpc.request.ticker, rpc.error->error_type); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[rpc.request.ticker].currently_enabled = false; update_coin_active({rpc.request.ticker}, false); this->dispatcher_.trigger(rpc.request.ticker, rpc.error->error); @@ -842,17 +921,33 @@ namespace atomic_dex { dispatcher_.trigger(coin_fully_initialized{.tickers = {rpc.request.ticker}}); fetch_single_balance(get_coin_info(rpc.request.ticker)); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[rpc.request.ticker].currently_enabled = true; + SPDLOG_DEBUG("marking {} as active", rpc.request.ticker); if constexpr (std::is_same_v) { for (const auto& erc20_address_info : rpc.result->erc20_addresses_infos) { - dispatcher_.trigger(coin_fully_initialized{.tickers = {erc20_address_info.first}}); - process_balance_answer(rpc); - m_coins_informations[erc20_address_info.first].currently_enabled = true; + SPDLOG_DEBUG("erc20_address_info.first {}: ", erc20_address_info.first); + if (erc20_address_info.second.balances.empty()) + { + SPDLOG_DEBUG("erc20_address_info.second.balances is empty"); + } + else + { + for (const auto& balance : erc20_address_info.second.balances) + { + SPDLOG_DEBUG("marking token {} as active", balance.first); + dispatcher_.trigger(coin_fully_initialized{.tickers = {balance.first}}); + //process_balance_answer(rpc); + fetch_single_balance(get_coin_info(balance.first)); + std::unique_lock lock(m_coin_cfg_mutex); + m_coins_informations[balance.first].currently_enabled = true; + } + } } } - process_balance_answer(rpc); + SPDLOG_DEBUG("process_balance_answer(rpc) done"); } }; @@ -867,11 +962,12 @@ namespace atomic_dex if (parent_ticker_info.currently_enabled) { - for (const auto& coin_config : coins) + for (const auto& token_config : coins) { - mm2::enable_erc20_rpc rpc{.request={.ticker = coin_config.ticker}}; + SPDLOG_DEBUG("Processing {} token: {}", parent_ticker, token_config.ticker); + mm2::enable_erc20_rpc rpc{.request={.ticker = token_config.ticker}}; - if (coin_config.ticker == parent_ticker_info.ticker) + if (token_config.ticker == parent_ticker_info.ticker) { continue; } @@ -881,15 +977,12 @@ namespace atomic_dex else { mm2::enable_eth_with_tokens_rpc rpc; - - rpc.request.coin_type = parent_ticker_info.coin_type; - rpc.request.is_testnet = parent_ticker_info.is_testnet.value_or(false); rpc.request.ticker = parent_ticker_info.ticker; rpc.request.nodes = parent_ticker_info.urls.value_or(std::vector{}); rpc.request.swap_contract_address = parent_ticker_info.swap_contract_address.value_or(""); - if (parent_ticker_info.fallback_swap_contract_address.value_or("") != "") + if (parent_ticker_info.fallback_swap_contract.value_or("") != "") { - rpc.request.fallback_swap_contract = parent_ticker_info.fallback_swap_contract_address.value_or(""); + rpc.request.fallback_swap_contract = parent_ticker_info.fallback_swap_contract.value_or(""); } for (const auto& coin_config : coins) { @@ -901,7 +994,7 @@ namespace atomic_dex } m_mm2_client.process_rpc_async(rpc.request, callback); } - this->m_nb_update_required += 1; + SPDLOG_DEBUG("mm2_service::enable_erc20_coins done for {}", parent_ticker); } void mm2_service::enable_tendermint_coin(coin_config coin_config, std::string parent_ticker) @@ -911,7 +1004,6 @@ namespace atomic_dex void mm2_service::enable_tendermint_coins(const t_coins& coins, const std::string parent_ticker) { - SPDLOG_INFO("Parent ticker: {}", parent_ticker); auto callback = [this](RpcRequest rpc) { if (rpc.error) @@ -920,6 +1012,7 @@ namespace atomic_dex { SPDLOG_ERROR("{} {}: ", rpc.request.ticker, rpc.error->error_type); fetch_single_balance(get_coin_info(rpc.request.ticker)); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[rpc.request.ticker].currently_enabled = true; dispatcher_.trigger(coin_fully_initialized{.tickers = {rpc.request.ticker}}); if constexpr (std::is_same_v) @@ -928,6 +1021,7 @@ namespace atomic_dex { SPDLOG_ERROR("{} {}: ", tendermint_coin_info.ticker, rpc.error->error_type); fetch_single_balance(get_coin_info(tendermint_coin_info.ticker)); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[tendermint_coin_info.ticker].currently_enabled = true; dispatcher_.trigger(coin_fully_initialized{.tickers = {tendermint_coin_info.ticker}}); } @@ -935,6 +1029,7 @@ namespace atomic_dex } else { + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[rpc.request.ticker].currently_enabled = false; update_coin_active({rpc.request.ticker}, false); this->dispatcher_.trigger(rpc.request.ticker, rpc.error->error); @@ -944,6 +1039,7 @@ namespace atomic_dex { dispatcher_.trigger(coin_fully_initialized{.tickers = {rpc.request.ticker}}); fetch_single_balance(get_coin_info(rpc.request.ticker)); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[rpc.request.ticker].currently_enabled = true; if constexpr (std::is_same_v) { @@ -951,6 +1047,7 @@ namespace atomic_dex { dispatcher_.trigger(coin_fully_initialized{.tickers = {tendermint_token_addresses_info.first}}); process_balance_answer(rpc); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[tendermint_token_addresses_info.first].currently_enabled = true; } } @@ -997,7 +1094,6 @@ namespace atomic_dex } m_mm2_client.process_rpc_async(rpc.request, callback); } - this->m_nb_update_required += 1; } void mm2_service::process_balance_answer(const mm2::enable_erc20_rpc& rpc) @@ -1006,44 +1102,62 @@ namespace atomic_dex mm2::balance_answer balance_answer; balance_answer.address = answer.balances.begin()->first; + SPDLOG_DEBUG("balance_answer.address: {}", balance_answer.address); balance_answer.balance = answer.balances.begin()->second.spendable; + SPDLOG_DEBUG("balance_answer.balance: {}", balance_answer.balance); balance_answer.coin = answer.platform_coin; - + SPDLOG_DEBUG("balance_answer.coin: {}", balance_answer.coin); { std::unique_lock lock(m_balance_mutex); m_balance_informations[balance_answer.coin] = std::move(balance_answer); } + SPDLOG_DEBUG("balance_answer for {} complete", rpc.request.ticker); } void mm2_service::process_balance_answer(const mm2::enable_eth_with_tokens_rpc& rpc) { + SPDLOG_DEBUG("mm2_service::process_balance_answer(const mm2::enable_eth_with_tokens_rpc& rpc"); const auto& answer = rpc.result.value(); { mm2::balance_answer balance_answer; - balance_answer.coin = rpc.request.ticker; + SPDLOG_DEBUG("balance_answer.coin: {}", balance_answer.coin); balance_answer.balance = answer.eth_addresses_infos.begin()->second.balances.spendable; + SPDLOG_DEBUG("balance_answer.balance: {}", balance_answer.balance); balance_answer.address = answer.eth_addresses_infos.begin()->first; + SPDLOG_DEBUG("balance_answer.address: {}", balance_answer.address); { std::unique_lock lock(m_balance_mutex); m_balance_informations[balance_answer.coin] = std::move(balance_answer); } + SPDLOG_DEBUG("balance_answer for {} complete", rpc.request.ticker); } if (answer.erc20_addresses_infos.empty()) { + SPDLOG_DEBUG("answer.erc20_addresses_infos is empty"); return; } + SPDLOG_DEBUG("for (auto [address, data] : answer.erc20_addresses_infos) [{}]", answer.erc20_addresses_infos.size()); for (auto [address, data] : answer.erc20_addresses_infos) { + SPDLOG_DEBUG("for (auto [address, data] : answer.erc20_addresses_infos) address [{}]", address); mm2::balance_answer balance_answer; - balance_answer.coin = data.balances.begin()->first; balance_answer.address = address; + if (data.balances.empty()) + { + SPDLOG_DEBUG("data.balances is empty"); + continue; + } balance_answer.balance = data.balances.begin()->second.spendable; + SPDLOG_DEBUG("balance_answer.coin: {}", balance_answer.balance); + balance_answer.coin = data.balances.begin()->first; + SPDLOG_DEBUG("balance_answer.coin: {}", balance_answer.coin); { std::unique_lock lock(m_balance_mutex); m_balance_informations[balance_answer.coin] = std::move(balance_answer); } } + SPDLOG_DEBUG("process_balance_answer for enable_eth_with_tokens_rpc complete"); } void mm2_service::process_balance_answer(const mm2::enable_tendermint_token_rpc& rpc) @@ -1106,10 +1220,11 @@ namespace atomic_dex { if (rpc.error) { + SPDLOG_ERROR("{} {}: ", rpc.request.ticker, rpc.error->error_type); if (rpc.error->error_type.find("PlatformIsAlreadyActivated") != std::string::npos || rpc.error->error_type.find("TokenIsAlreadyActivated") != std::string::npos) { - SPDLOG_ERROR("{} {}: ", rpc.request.ticker, rpc.error->error_type); fetch_single_balance(get_coin_info(rpc.request.ticker)); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[rpc.request.ticker].currently_enabled = true; dispatcher_.trigger(coin_fully_initialized{.tickers = {rpc.request.ticker}}); if constexpr (std::is_same_v) @@ -1118,6 +1233,7 @@ namespace atomic_dex { SPDLOG_ERROR("{} {}: ", slp_coin_info.ticker, rpc.error->error_type); fetch_single_balance(get_coin_info(slp_coin_info.ticker)); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[slp_coin_info.ticker].currently_enabled = true; dispatcher_.trigger(coin_fully_initialized{.tickers = {slp_coin_info.ticker}}); } @@ -1125,6 +1241,7 @@ namespace atomic_dex } else { + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[rpc.request.ticker].currently_enabled = false; update_coin_active({rpc.request.ticker}, false); this->dispatcher_.trigger(rpc.request.ticker, rpc.error->error); @@ -1134,6 +1251,7 @@ namespace atomic_dex { dispatcher_.trigger(coin_fully_initialized{.tickers = {rpc.request.ticker}}); fetch_single_balance(get_coin_info(rpc.request.ticker)); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[rpc.request.ticker].currently_enabled = true; if constexpr (std::is_same_v) { @@ -1143,13 +1261,13 @@ namespace atomic_dex { dispatcher_.trigger(coin_fully_initialized{.tickers = {balance.first}}); process_balance_answer(rpc); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[balance.first].currently_enabled = true; } } } process_balance_answer(rpc); } - this->m_nb_update_required += 1; }; if (!has_coin(bch_ticker)) @@ -1209,10 +1327,11 @@ namespace atomic_dex { if (rpc.error) { + SPDLOG_ERROR("{} {}: ", rpc.request.ticker, rpc.error->error_type); if (rpc.error->error_type.find("PlatformIsAlreadyActivated") != std::string::npos || rpc.error->error_type.find("TokenIsAlreadyActivated") != std::string::npos) { - SPDLOG_ERROR("{} {}: ", rpc.request.ticker, rpc.error->error_type); fetch_single_balance(get_coin_info(rpc.request.ticker)); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[rpc.request.ticker].currently_enabled = true; dispatcher_.trigger(coin_fully_initialized{.tickers = {rpc.request.ticker}}); if constexpr (std::is_same_v) @@ -1221,6 +1340,7 @@ namespace atomic_dex { SPDLOG_ERROR("{} {}: ", slp_coin_info.ticker, rpc.error->error_type); fetch_single_balance(get_coin_info(slp_coin_info.ticker)); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[slp_coin_info.ticker].currently_enabled = true; dispatcher_.trigger(coin_fully_initialized{.tickers = {slp_coin_info.ticker}}); } @@ -1228,6 +1348,7 @@ namespace atomic_dex } else { + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[rpc.request.ticker].currently_enabled = false; update_coin_active({rpc.request.ticker}, false); this->dispatcher_.trigger(rpc.request.ticker, rpc.error->error); @@ -1237,6 +1358,7 @@ namespace atomic_dex { dispatcher_.trigger(coin_fully_initialized{.tickers = {rpc.request.ticker}}); fetch_single_balance(get_coin_info(rpc.request.ticker)); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[rpc.request.ticker].currently_enabled = true; if constexpr (std::is_same_v) { @@ -1246,13 +1368,13 @@ namespace atomic_dex { dispatcher_.trigger(coin_fully_initialized{.tickers = {balance.first}}); process_balance_answer(rpc); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[balance.first].currently_enabled = true; } } } process_balance_answer(rpc); } - this->m_nb_update_required += 1; }; if (!has_coin(bch_ticker)) @@ -1370,6 +1492,7 @@ namespace atomic_dex (void)tickers; (void)is_during_enabling; auto&& [batch_array, tickers_idx, tokens_to_fetch] = prepare_batch_balance_and_tx(only_tx); + SPDLOG_DEBUG("mm2_service::batch_balance_and_tx"); return m_mm2_client.async_rpc_batch_standalone(batch_array) .then( [this, tokens_to_fetch = tokens_to_fetch, is_a_reset, tickers, batch_array = batch_array](web::http::http_response resp) @@ -1430,6 +1553,7 @@ namespace atomic_dex std::tuple, std::vector> mm2_service::prepare_batch_balance_and_tx(bool only_tx) const { + SPDLOG_DEBUG("mm2_service::prepare_batch_balance_and_tx"); const auto& enabled_coins = get_enabled_coins(); nlohmann::json batch_array = nlohmann::json::array(); std::vector tickers_idx; @@ -1567,7 +1691,7 @@ namespace atomic_dex mm2::to_json(j, request); nlohmann::json batch = nlohmann::json::array(); batch.push_back(j); - SPDLOG_INFO("ZHTLC request: {}", batch.dump(4)); + // SPDLOG_INFO("ZHTLC request: {}", batch.dump(4)); return {batch, {coin_info.ticker}}; }; @@ -1600,7 +1724,6 @@ namespace atomic_dex SPDLOG_DEBUG("{} activation complete!", tickers[idx]); std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[tickers[idx]].currently_enabled = true; - this->m_nb_update_required += 1; this->dispatcher_.trigger(coin_fully_initialized{.tickers = {tickers[idx]}}); this->dispatcher_.trigger(tickers[idx], "Complete!"); } @@ -1624,7 +1747,7 @@ namespace atomic_dex nlohmann::json z_batch_array = nlohmann::json::array(); t_enable_z_coin_status_request z_request{.task_id = task_id}; - SPDLOG_INFO("{} enable_z_coin Task ID: {}", tickers[idx], task_id); + // SPDLOG_INFO("{} enable_z_coin Task ID: {}", tickers[idx], task_id); nlohmann::json j = mm2::template_request("task::enable_z_coin::status", true); mm2::to_json(j, z_request); @@ -1640,11 +1763,12 @@ namespace atomic_dex std::string status = z_answers[0].at("result").at("status").get(); // SPDLOG_DEBUG("{} status : {}", tickers[idx], status); - SPDLOG_INFO("{} Activation Status: {}", tickers[idx], z_answers[0].dump()); + // SPDLOG_INFO("{} Activation Status: {}", tickers[idx], z_answers[0].dump()); if (status == "Ok") { - SPDLOG_INFO("{} activation ready...", tickers[idx]); + // SPDLOG_INFO("{} activation ready...", tickers[idx]); + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[tickers[idx]].activation_status = z_answers[0]; if (z_answers[0].at("result").at("details").contains("error")) { @@ -1659,12 +1783,10 @@ namespace atomic_dex SPDLOG_INFO("Enabling [{}] error: {}", tickers[idx], event); break; } - SPDLOG_INFO("{} activation complete!", tickers[idx]); - std::unique_lock lock(m_coin_cfg_mutex); + // SPDLOG_INFO("{} activation complete!", tickers[idx]); m_coins_informations[tickers[idx]].currently_enabled = true; dispatcher_.trigger(coin_fully_initialized{.tickers = {tickers[idx]}}); - this->m_nb_update_required += 1; break; } else if (status == "Error") @@ -1700,14 +1822,13 @@ namespace atomic_dex if (event != last_event) { - SPDLOG_INFO("Waiting for {} to enable [{}: {}]...", tickers[idx], status, event); + // SPDLOG_INFO("Waiting for {} to enable [{}: {}]...", tickers[idx], status, event); if (!m_coins_informations[tickers[idx]].currently_enabled && event != "ActivatingCoin") { std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[tickers[idx]].currently_enabled = true; dispatcher_.trigger(coin_fully_initialized{.tickers = {tickers[idx]}}); - this->m_nb_update_required += 1; } this->dispatcher_.trigger(tickers[idx], event); last_event = event; @@ -1715,6 +1836,7 @@ namespace atomic_dex // todo(syl): refactor to a background task std::this_thread::sleep_for(5s); } + std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[tickers[idx]].activation_status = z_answers[0]; z_nb_try += 1; @@ -1785,7 +1907,6 @@ namespace atomic_dex SPDLOG_DEBUG("Init balance for {}...", tickers[0]); fetch_single_balance(get_coin_info(tickers[0])); } - this->m_nb_update_required += 1; } } } @@ -1802,7 +1923,6 @@ namespace atomic_dex this->handle_exception_pplx_task(previous_task, "batch_enable_coins", batch); update_coin_status(this->m_current_wallet_name, tickers, false, m_coins_informations, m_coin_cfg_mutex); }); - this->m_nb_update_required += 1; }; for (auto&& coin: coins) @@ -1879,16 +1999,16 @@ namespace atomic_dex if (orderbook.base.empty() && orderbook.rel.empty()) { ec = dextop_error::orderbook_empty; - SPDLOG_WARN("base/rel/orderbook mismatch: {} != {}", pair, orderbook.base + "/" + rel); + // SPDLOG_WARN("base/rel/orderbook mismatch: {} != {}", pair, orderbook.base + "/" + rel); return {}; } if (pair != orderbook.base + "/" + rel) { - SPDLOG_WARN("base/rel/orderbook mismatch: {} != {}", pair, orderbook.base + "/" + rel); + // SPDLOG_WARN("base/rel/orderbook mismatch: {} != {}", pair, orderbook.base + "/" + rel); ec = dextop_error::orderbook_ticker_not_found; return {}; } - SPDLOG_DEBUG("orderbook active: {}/{}", orderbook.base + "/" + orderbook.rel); + // SPDLOG_DEBUG("orderbook active: {}/{}", orderbook.base + "/" + orderbook.rel); return orderbook; } @@ -1929,7 +2049,7 @@ namespace atomic_dex process_orderbook_extras(batch, is_a_reset); } m_orderbook = rpc.result.value(); - SPDLOG_DEBUG("Triggering [process_orderbook_finished]: {}", is_a_reset); + // SPDLOG_DEBUG("Triggering [process_orderbook_finished]: {}", is_a_reset); this->dispatcher_.trigger(is_a_reset); } }; @@ -2013,14 +2133,11 @@ namespace atomic_dex void mm2_service::fetch_current_orderbook_thread(bool is_a_reset) { - m_orderbook_thread_active ? SPDLOG_WARN("Not fetching orderbook, m_orderbook_thread_active is true") : SPDLOG_INFO("Fetching current orderbook"); - //! If thread is not active ex: we are not on the trading page anymore, we continue sleeping. if (!m_orderbook_thread_active) { return; } - process_orderbook(is_a_reset); } @@ -2032,11 +2149,13 @@ namespace atomic_dex std::shared_lock lock(m_balance_mutex); ///< shared_lock if (m_balance_informations.find(cfg_infos.ticker) != m_balance_informations.cend()) { + SPDLOG_DEBUG("m_balance_informations not found for {} ", cfg_infos.ticker); return; } } t_balance_request balance_request{.coin = cfg_infos.ticker}; + SPDLOG_DEBUG("Getting balance from mm2 for {} ", cfg_infos.ticker); nlohmann::json j = mm2::template_request("my_balance"); mm2::to_json(j, balance_request); batch_array.push_back(j); @@ -2072,6 +2191,7 @@ namespace atomic_dex else { const auto& enabled_coins = get_enabled_coins(); + SPDLOG_DEBUG("Running [fetch_infos_thread] for {} enabled coins", enabled_coins.size()); for (auto&& coin: enabled_coins) { fetch_single_balance(coin); } batch_balance_and_tx(is_a_refresh, {}, false, true); } @@ -2151,14 +2271,6 @@ namespace atomic_dex }); } - t_float_50 - mm2_service::get_balance(const std::string& ticker) const - { - std::error_code ec; - t_float_50 balance = safe_float(my_balance(ticker, ec)); - return balance; - } - std::pair mm2_service::get_tx(t_mm2_ec& ec) const { @@ -2187,17 +2299,29 @@ namespace atomic_dex return get_tx(ec).first; } + t_float_50 + mm2_service::get_balance(const std::string& ticker) const + { + std::error_code ec; + std::string balance_str = my_balance(ticker, ec); + t_float_50 balance_f = safe_float(balance_str); + // SPDLOG_DEBUG("get_balance for {}: [{}]", ticker, balance_str); + return balance_f; + } + std::string mm2_service::my_balance(const std::string& ticker, t_mm2_ec& ec) const { + // This happens too often std::shared_lock lock(m_balance_mutex); ///! read auto it = m_balance_informations.find(ticker); if (it == m_balance_informations.cend()) { + SPDLOG_DEBUG("my_balance not found for {}", ticker); ec = dextop_error::balance_of_a_non_enabled_coin; return "0"; } - + // SPDLOG_DEBUG("my_balance for {}: [{}]", ticker, it->second.balance); return it->second.balance; } @@ -2207,6 +2331,7 @@ namespace atomic_dex nlohmann::json batch = nlohmann::json::array(); nlohmann::json my_orders_request = mm2::template_request("my_orders"); batch.push_back(my_orders_request); + // SPDLOG_DEBUG("my_orders_request {}", my_orders_request.dump(4)); //! Swaps preparation @@ -2236,12 +2361,14 @@ namespace atomic_dex }; to_json(my_swaps, request); batch.push_back(my_swaps); + // SPDLOG_INFO("my_swaps req: {}", my_swaps.dump(4)); //! Active swaps nlohmann::json active_swaps = mm2::template_request("active_swaps"); t_active_swaps_request active_swaps_request{.statuses = true}; to_json(active_swaps, active_swaps_request); batch.push_back(active_swaps); + // SPDLOG_INFO("active_swaps req: {}", active_swaps.dump(4)); auto answer_functor = [this, limit, filter_infos, after_manual_reset](web::http::http_response resp) { @@ -2469,19 +2596,19 @@ namespace atomic_dex void mm2_service::update_sync_ticker_pair(std::string base, std::string rel) { - SPDLOG_DEBUG("update_sync_ticker_pair: [{} / {}]", base, rel); + // SPDLOG_DEBUG("update_sync_ticker_pair: [{} / {}]", base, rel); this->m_synchronized_ticker_pair = std::make_pair(base, rel); } void mm2_service::on_refresh_orderbook_model_data(const refresh_orderbook_model_data& evt) { - SPDLOG_DEBUG("refreshing orderbook pair: [{} / {}]", evt.base, evt.rel); + // SPDLOG_DEBUG("refreshing orderbook pair: [{} / {}]", evt.base, evt.rel); this->m_synchronized_ticker_pair = std::make_pair(evt.base, evt.rel); if (this->m_mm2_running) { - SPDLOG_DEBUG("process_orderbook(true)"); + // SPDLOG_DEBUG("process_orderbook(true)"); process_orderbook(true); } } @@ -2504,6 +2631,7 @@ namespace atomic_dex bool mm2_service::do_i_have_enough_funds(const std::string& ticker, const t_float_50& amount) const { + SPDLOG_DEBUG("do_i_have_enough_funds for {}: [{}]", ticker, amount.str(8, std::ios_base::fixed)); t_float_50 funds = get_balance(ticker); return funds >= amount; } @@ -2577,6 +2705,7 @@ namespace atomic_dex void mm2_service::decrease_fake_balance(const std::string& ticker, const std::string& amount) { + SPDLOG_DEBUG("decrease_fake_balance for {}: [{}]", ticker, amount); t_float_50 balance = get_balance(ticker); t_float_50 amount_f(amount); t_float_50 result = balance - amount_f; diff --git a/src/core/atomicdex/services/mm2/mm2.service.hpp b/src/core/atomicdex/services/mm2/mm2.service.hpp index a98f8f1cfc..2fea97b8f5 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.hpp +++ b/src/core/atomicdex/services/mm2/mm2.service.hpp @@ -92,17 +92,18 @@ namespace atomic_dex //! Timers t_mm2_time_point m_orderbook_clock; t_mm2_time_point m_info_clock; + t_mm2_time_point m_activation_clock; //! Atomicity / Threads std::atomic_bool m_mm2_running{false}; std::atomic_bool m_orderbook_thread_active{false}; // Only active when in trading view (pro and simple) - std::atomic_size_t m_nb_update_required{0}; std::thread m_mm2_init_thread; //! Current wallet name std::string m_current_wallet_name; //! Mutex + mutable std::shared_mutex m_activation_mutex; mutable std::shared_mutex m_balance_mutex; mutable std::shared_mutex m_coin_cfg_mutex; mutable std::shared_mutex m_raw_coin_cfg_mutex; @@ -114,6 +115,7 @@ namespace atomic_dex t_orderbook m_orderbook{mm2::orderbook_result_rpc{}}; t_orders_and_swaps m_orders_and_swaps{orders_and_swaps{}}; t_mm2_raw_coins_registry m_mm2_raw_coins_cfg{parse_raw_mm2_coins_file()}; + t_coins m_activation_queue; //! Balance factor double m_balance_factor{1.0}; @@ -166,6 +168,7 @@ namespace atomic_dex // Coins enabling functions bool enable_default_coins(); // Enables required coins + coins enabled in the config + void activate_coins(const t_coins& coins); void enable_coins(const std::vector& tickers); void enable_coins(const t_coins& coins); void enable_coin(const std::string& ticker); From 427fdc8d49147f303d392a737840c9ef7d0c9ff8 Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 09:42:55 +0800 Subject: [PATCH 26/43] fix moved function, dont use new methods --- .../atomicdex/services/mm2/mm2.service.cpp | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index ee6c4c33fc..b3f7461c9d 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -129,11 +129,6 @@ namespace } } - void mm2_service::update_coin_active(const std::vector& tickers, bool status) - { - update_coin_status(this->m_current_wallet_name, tickers, status, m_coins_informations, m_coin_cfg_mutex); - } - void update_coin_status(const std::string& wallet_name, const std::vector& tickers, bool status, atomic_dex::t_coins_registry& registry, std::shared_mutex& registry_mtx, std::string field_name = "active") { @@ -321,11 +316,10 @@ namespace atomic_dex if (!m_activation_queue.empty()) { std::unique_lock lock(m_activation_mutex); - SPDLOG_DEBUG("Activating {} coins from activation queue", m_activation_queue.size()); + SPDLOG_DEBUG("{} coins in the activation queue", m_activation_queue.size()); t_coins to_enable; for (size_t i = 0; i < 20 && i < m_activation_queue.size(); ++i) { - SPDLOG_DEBUG("Activating {} coins from activation queue", m_activation_queue.size()); to_enable.push_back(m_activation_queue[i]); } activate_coins(to_enable); @@ -552,13 +546,12 @@ namespace atomic_dex SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", coins.size()); for (const auto& coin_cfg : coins) { - if (coin_cfg.currently_enabled) { SPDLOG_WARN("{} cannot be enabled because it already is or is being enabled.", coin_cfg.ticker); continue; } - SPDLOG_INFO("Preparing {} for activation", coin_cfg.ticker); + // SPDLOG_INFO("Preparing {} for activation", coin_cfg.ticker); if (coin_cfg.coin_type == CoinType::SLP || (coin_cfg.other_types && coin_cfg.other_types->contains(CoinType::SLP))) { if (coin_cfg.is_testnet.value_or(false)) @@ -596,8 +589,7 @@ namespace atomic_dex } else if (coin_cfg.coin_type == CoinType::BEP20) { - // coin_cfg.is_testnet.value_or(false) ? bep20_testnet_coins.push_back(coin_cfg) : bep20_coins.push_back(coin_cfg); - erc_family_coins.push_back(coin_cfg); + coin_cfg.is_testnet.value_or(false) ? bep20_testnet_coins.push_back(coin_cfg) : bep20_coins.push_back(coin_cfg); } else if (coin_cfg.is_erc_family) { @@ -616,12 +608,14 @@ namespace atomic_dex if (bep20_coins.size() > 0) { SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} BEP20 coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", bep20_coins.size()); - enable_erc20_coins(bep20_coins, "BNB"); + // enable_erc20_coins(bep20_coins, "BNB"); + enable_erc_family_coins(erc_family_coins); } if (bep20_testnet_coins.size() > 0) { SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} bep20_testnet_coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", bep20_testnet_coins.size()); - enable_erc20_coins(bep20_testnet_coins, "BNBT"); + // enable_erc20_coins(bep20_testnet_coins, "BNBT"); + enable_erc_family_coins(erc_family_coins); } if (erc_family_coins.size() > 0) { @@ -660,6 +654,11 @@ namespace atomic_dex } } + void mm2_service::update_coin_active(const std::vector& tickers, bool status) + { + update_coin_status(this->m_current_wallet_name, tickers, status, m_coins_informations, m_coin_cfg_mutex); + } + void mm2_service::enable_erc_family_coin(const coin_config& coin_cfg) { enable_erc_family_coins(t_coins{coin_cfg}); @@ -964,7 +963,7 @@ namespace atomic_dex { for (const auto& token_config : coins) { - SPDLOG_DEBUG("Processing {} token: {}", parent_ticker, token_config.ticker); + // SPDLOG_DEBUG("Processing {} token: {}", parent_ticker, token_config.ticker); mm2::enable_erc20_rpc rpc{.request={.ticker = token_config.ticker}}; if (token_config.ticker == parent_ticker_info.ticker) From 4cd0c926b7721f00a490df53570bb3868c902d3c Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 13:45:56 +0800 Subject: [PATCH 27/43] fix conflicts --- cmake/project.metadata.cmake | 2 +- src/app/app.cpp | 2 +- src/app/app.hpp | 2 +- src/app/main.prerequisites.hpp | 2 +- src/core/atomicdex/api/api.call.hpp | 2 +- src/core/atomicdex/api/coinpaprika/coinpaprika.cpp | 2 +- src/core/atomicdex/api/coinpaprika/coinpaprika.hpp | 2 +- src/core/atomicdex/api/faucet/faucet.cpp | 2 +- src/core/atomicdex/api/faucet/faucet.hpp | 2 +- src/core/atomicdex/api/mm2/address_format.cpp | 2 +- src/core/atomicdex/api/mm2/address_format.hpp | 2 +- src/core/atomicdex/api/mm2/balance_infos.cpp | 2 +- src/core/atomicdex/api/mm2/balance_infos.hpp | 2 +- src/core/atomicdex/api/mm2/generics.cpp | 2 +- src/core/atomicdex/api/mm2/generics.hpp | 2 +- src/core/atomicdex/api/mm2/mm2.client.cpp | 2 +- src/core/atomicdex/api/mm2/mm2.cpp | 2 +- src/core/atomicdex/api/mm2/mm2.error.code.cpp | 2 +- src/core/atomicdex/api/mm2/mm2.error.code.hpp | 2 +- src/core/atomicdex/api/mm2/mm2.hpp | 2 +- src/core/atomicdex/api/mm2/orderbook.order.contents.cpp | 2 +- src/core/atomicdex/api/mm2/orderbook.order.contents.hpp | 2 +- src/core/atomicdex/api/mm2/rpc.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.buy.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.buy.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.max_taker_vol.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.max_taker_vol.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.my_balance.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.my_balance.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.sell.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.sell.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.setprice.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v1/rpc.setprice.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp | 2 +- .../atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp | 2 +- .../atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.cancel.cpp | 2 +- .../atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.cancel.hpp | 2 +- .../atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.init.cpp | 2 +- .../atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.init.hpp | 2 +- .../atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.status.cpp | 2 +- .../atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.status.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.init.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.init.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.status.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.status.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.fwd.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.hpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.z_coin_tx_history.cpp | 2 +- src/core/atomicdex/api/mm2/rpc_v2/rpc2.z_coin_tx_history.hpp | 2 +- src/core/atomicdex/api/mm2/trading.order.contents.cpp | 2 +- src/core/atomicdex/api/mm2/trading.order.contents.hpp | 2 +- src/core/atomicdex/api/mm2/utxo_merge_params.cpp | 2 +- src/core/atomicdex/api/mm2/utxo_merge_params.hpp | 2 +- src/core/atomicdex/config/addressbook.cfg.cpp | 2 +- src/core/atomicdex/config/addressbook.cfg.hpp | 2 +- src/core/atomicdex/config/app.cfg.cpp | 2 +- src/core/atomicdex/config/app.cfg.hpp | 2 +- src/core/atomicdex/config/coins.cfg.cpp | 2 +- src/core/atomicdex/config/coins.cfg.hpp | 2 +- src/core/atomicdex/config/electrum.cfg.cpp | 2 +- src/core/atomicdex/config/electrum.cfg.hpp | 2 +- src/core/atomicdex/config/enable.cfg.cpp | 2 +- src/core/atomicdex/config/enable.cfg.hpp | 2 +- src/core/atomicdex/config/mm2.cfg.hpp | 2 +- src/core/atomicdex/config/wallet.cfg.cpp | 2 +- src/core/atomicdex/config/wallet.cfg.hpp | 2 +- src/core/atomicdex/constants/qt.actions.hpp | 2 +- src/core/atomicdex/constants/qt.coins.enums.cpp | 2 +- src/core/atomicdex/constants/qt.coins.enums.hpp | 2 +- src/core/atomicdex/data/wallet/qt.portfolio.data.hpp | 2 +- src/core/atomicdex/events/events.hpp | 2 +- src/core/atomicdex/events/qt.events.hpp | 2 +- src/core/atomicdex/managers/addressbook.manager.cpp | 2 +- src/core/atomicdex/managers/addressbook.manager.hpp | 2 +- src/core/atomicdex/managers/notification.manager.cpp | 2 +- src/core/atomicdex/managers/notification.manager.hpp | 2 +- src/core/atomicdex/managers/qt.wallet.manager.cpp | 2 +- src/core/atomicdex/managers/qt.wallet.manager.hpp | 2 +- src/core/atomicdex/models/qt.addressbook.contact.model.cpp | 2 +- src/core/atomicdex/models/qt.addressbook.contact.model.hpp | 2 +- .../models/qt.addressbook.contact.proxy.filter.model.cpp | 2 +- .../models/qt.addressbook.contact.proxy.filter.model.hpp | 2 +- src/core/atomicdex/models/qt.addressbook.model.cpp | 2 +- src/core/atomicdex/models/qt.addressbook.model.hpp | 2 +- src/core/atomicdex/models/qt.addressbook.proxy.filter.model.cpp | 2 +- src/core/atomicdex/models/qt.addressbook.proxy.filter.model.hpp | 2 +- src/core/atomicdex/models/qt.global.coins.cfg.model.cpp | 2 +- src/core/atomicdex/models/qt.global.coins.cfg.model.hpp | 2 +- .../atomicdex/models/qt.global.coins.cfg.proxy.filter.model.cpp | 2 +- .../atomicdex/models/qt.global.coins.cfg.proxy.filter.model.hpp | 2 +- src/core/atomicdex/models/qt.orderbook.model.cpp | 2 +- src/core/atomicdex/models/qt.orderbook.model.hpp | 2 +- src/core/atomicdex/models/qt.orderbook.proxy.model.cpp | 2 +- src/core/atomicdex/models/qt.orderbook.proxy.model.hpp | 2 +- src/core/atomicdex/models/qt.orders.model.cpp | 2 +- src/core/atomicdex/models/qt.orders.model.hpp | 2 +- src/core/atomicdex/models/qt.orders.proxy.model.cpp | 2 +- src/core/atomicdex/models/qt.orders.proxy.model.hpp | 2 +- src/core/atomicdex/models/qt.portfolio.model.cpp | 2 +- src/core/atomicdex/models/qt.portfolio.model.hpp | 2 +- src/core/atomicdex/models/qt.portfolio.proxy.filter.model.cpp | 2 +- src/core/atomicdex/models/qt.portfolio.proxy.filter.model.hpp | 2 +- src/core/atomicdex/models/transactions_model.cpp | 2 +- src/core/atomicdex/models/transactions_model.hpp | 2 +- src/core/atomicdex/models/transactions_proxy_model.cpp | 2 +- src/core/atomicdex/models/transactions_proxy_model.hpp | 2 +- src/core/atomicdex/pages/qt.addressbook.page.cpp | 2 +- src/core/atomicdex/pages/qt.addressbook.page.hpp | 2 +- src/core/atomicdex/pages/qt.portfolio.page.cpp | 2 +- src/core/atomicdex/pages/qt.portfolio.page.hpp | 2 +- src/core/atomicdex/pages/qt.settings.page.cpp | 2 +- src/core/atomicdex/pages/qt.settings.page.hpp | 2 +- src/core/atomicdex/pages/qt.trading.page.cpp | 2 +- src/core/atomicdex/pages/qt.trading.page.hpp | 2 +- src/core/atomicdex/pages/widgets/dex/qt.market.pairs.cpp | 2 +- src/core/atomicdex/pages/widgets/dex/qt.market.pairs.hpp | 2 +- src/core/atomicdex/pages/widgets/dex/qt.multi.orders.widget.cpp | 2 +- src/core/atomicdex/pages/widgets/dex/qt.multi.orders.widget.hpp | 2 +- src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp | 2 +- src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp | 2 +- src/core/atomicdex/pages/widgets/dex/qt.orders.widget.cpp | 2 +- src/core/atomicdex/pages/widgets/dex/qt.orders.widget.hpp | 2 +- src/core/atomicdex/pch.hpp | 2 +- src/core/atomicdex/platform/osx/manager.hpp | 2 +- src/core/atomicdex/platform/osx/manager.mm | 2 +- src/core/atomicdex/services/exporter/exporter.service.cpp | 2 +- src/core/atomicdex/services/exporter/exporter.service.hpp | 2 +- .../atomicdex/services/internet/internet.checker.service.cpp | 2 +- .../atomicdex/services/internet/internet.checker.service.hpp | 2 +- .../atomicdex/services/mm2/auto.update.maker.order.service.cpp | 2 +- .../atomicdex/services/mm2/auto.update.maker.order.service.hpp | 2 +- src/core/atomicdex/services/mm2/mm2.service.cpp | 2 +- src/core/atomicdex/services/mm2/mm2.service.hpp | 2 +- .../services/price/coinpaprika/coinpaprika.provider.cpp | 2 +- .../services/price/coinpaprika/coinpaprika.provider.hpp | 2 +- src/core/atomicdex/services/price/defi.stats.cpp | 2 +- src/core/atomicdex/services/price/defi.stats.hpp | 2 +- src/core/atomicdex/services/price/global.provider.cpp | 2 +- src/core/atomicdex/services/price/global.provider.hpp | 2 +- src/core/atomicdex/services/price/orderbook.scanner.service.cpp | 2 +- src/core/atomicdex/services/price/orderbook.scanner.service.hpp | 2 +- src/core/atomicdex/services/update/update.checker.service.cpp | 2 +- src/core/atomicdex/services/update/update.checker.service.hpp | 2 +- src/core/atomicdex/services/update/zcash.params.service.cpp | 2 +- src/core/atomicdex/services/update/zcash.params.service.hpp | 2 +- src/core/atomicdex/utilities/cpprestsdk.utilities.cpp | 2 +- src/core/atomicdex/utilities/cpprestsdk.utilities.hpp | 2 +- src/core/atomicdex/utilities/global.utilities.hpp | 2 +- src/core/atomicdex/utilities/kill.cpp | 2 +- src/core/atomicdex/utilities/kill.hpp | 2 +- src/core/atomicdex/utilities/log.prerequisites.hpp | 2 +- src/core/atomicdex/utilities/nlohmann.json.sax.private.cpp | 2 +- src/core/atomicdex/utilities/qt.download.manager.cpp | 2 +- src/core/atomicdex/utilities/qt.download.manager.hpp | 2 +- src/core/atomicdex/utilities/qt.utilities.cpp | 2 +- src/core/atomicdex/utilities/qt.utilities.hpp | 2 +- src/core/atomicdex/utilities/security.utilities.cpp | 2 +- src/core/atomicdex/utilities/security.utilities.hpp | 2 +- src/core/atomicdex/version/version.hpp | 2 +- src/tests/api/mm2/mm2.api.address_format.tests.cpp | 2 +- src/tests/api/mm2/mm2.api.balance_infos.tests.cpp | 2 +- src/tests/api/mm2/mm2.api.utxo_merge_params.tests.cpp | 2 +- src/tests/atomic.dex.provider.cex.prices.api.tests.cpp | 2 +- src/tests/atomic.dex.provider.cex.prices.tests.cpp | 2 +- src/tests/atomic.dex.qt.utilities.tests.cpp | 2 +- src/tests/atomic.dex.tests.cpp | 2 +- src/tests/atomic.dex.tests.hpp | 2 +- src/tests/atomic.dex.wallet.config.tests.cpp | 2 +- src/tests/config/addressbook.cfg.tests.cpp | 2 +- src/tests/managers/addressbook.manager.tests.cpp | 2 +- src/tests/models/qt.addressbook.contact.model.tests.cpp | 2 +- src/tests/utilities/global.utilities.tests.cpp | 2 +- src/tests/utilities/qt.utilities.tests.cpp | 2 +- .../core/antara/gaming/core/antara.core.real.path.tests.cpp | 2 +- .../modules/core/antara/gaming/core/antara.core.tests.cpp | 2 +- .../modules/core/antara/gaming/core/api.scaling.cpp | 2 +- .../modules/core/antara/gaming/core/api.scaling.hpp | 2 +- .../core/antara/gaming/core/details/emscripten/api.scaling.hpp | 2 +- .../core/antara/gaming/core/details/emscripten/real.path.hpp | 2 +- .../core/antara/gaming/core/details/linux/api.scaling.hpp | 2 +- .../modules/core/antara/gaming/core/details/linux/real.path.hpp | 2 +- .../gaming/core/details/linux/security.authentification.hpp | 2 +- .../modules/core/antara/gaming/core/details/osx/api.scaling.hpp | 2 +- .../modules/core/antara/gaming/core/details/osx/api.scaling.mm | 2 +- .../modules/core/antara/gaming/core/details/osx/real.path.hpp | 2 +- .../gaming/core/details/osx/security.authentification.hpp | 2 +- .../core/antara/gaming/core/details/posix/open.url.browser.hpp | 2 +- .../core/antara/gaming/core/details/windows/api.scaling.hpp | 2 +- .../antara/gaming/core/details/windows/open.url.browser.hpp | 2 +- .../core/antara/gaming/core/details/windows/real.path.hpp | 2 +- .../gaming/core/details/windows/security.authentification.hpp | 2 +- .../modules/core/antara/gaming/core/open.url.browser.hpp | 2 +- .../modules/core/antara/gaming/core/real.path.cpp | 2 +- .../modules/core/antara/gaming/core/real.path.hpp | 2 +- .../modules/core/antara/gaming/core/safe.refl.hpp | 2 +- .../modules/core/antara/gaming/core/version.hpp | 2 +- .../modules/ecs/antara/gaming/ecs/all.components.hpp | 2 +- .../gaming/ecs/antara.ecs.event.add.base.system.tests.cpp | 2 +- .../ecs/antara/gaming/ecs/antara.ecs.system.manager.tests.cpp | 2 +- .../modules/ecs/antara/gaming/ecs/antara.ecs.system.tests.cpp | 2 +- .../modules/ecs/antara/gaming/ecs/antara.ecs.tests.cpp | 2 +- .../modules/ecs/antara/gaming/ecs/base.system.cpp | 2 +- .../modules/ecs/antara/gaming/ecs/base.system.hpp | 2 +- .../modules/ecs/antara/gaming/ecs/event.add.base.system.cpp | 2 +- .../modules/ecs/antara/gaming/ecs/event.add.base.system.hpp | 2 +- .../modules/ecs/antara/gaming/ecs/lambda.system.hpp | 2 +- .../modules/ecs/antara/gaming/ecs/lambda.system.ipp | 2 +- .../antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.hpp | 2 +- .../antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.ipp | 2 +- .../modules/ecs/antara/gaming/ecs/system.manager.cpp | 2 +- .../modules/ecs/antara/gaming/ecs/system.manager.hpp | 2 +- .../modules/ecs/antara/gaming/ecs/system.manager.ipp | 2 +- .../modules/ecs/antara/gaming/ecs/system.type.hpp | 2 +- .../modules/event/antara/gaming/event/all.events.hpp | 2 +- .../antara/gaming/event/antara.event.fatal.error.tests.cpp | 2 +- .../event/antara/gaming/event/antara.event.quit.game.tests.cpp | 2 +- .../modules/event/antara/gaming/event/antara.event.tests.cpp | 2 +- .../antara/gaming/event/antara.event.type.traits.tests.cpp | 2 +- .../modules/event/antara/gaming/event/event.invoker.hpp | 2 +- .../modules/event/antara/gaming/event/fatal.error.cpp | 2 +- .../modules/event/antara/gaming/event/fatal.error.hpp | 2 +- .../modules/event/antara/gaming/event/quit.game.cpp | 2 +- .../modules/event/antara/gaming/event/quit.game.hpp | 2 +- .../modules/event/antara/gaming/event/start.game.hpp | 2 +- .../modules/event/antara/gaming/event/type.traits.hpp | 2 +- .../modules/timer/antara/gaming/timer/antara.timer.tests.cpp | 2 +- .../timer/antara/gaming/timer/antara.timer.time.step.tests.cpp | 2 +- .../antara-gaming_sdk/modules/timer/antara/gaming/timer/fps.hpp | 2 +- .../modules/timer/antara/gaming/timer/time.step.cpp | 2 +- .../modules/timer/antara/gaming/timer/time.step.hpp | 2 +- .../world/antara/gaming/world/antara.world.app.tests.cpp | 2 +- .../modules/world/antara/gaming/world/antara.world.tests.cpp | 2 +- .../modules/world/antara/gaming/world/world.app.cpp | 2 +- .../modules/world/antara/gaming/world/world.app.hpp | 2 +- 245 files changed, 245 insertions(+), 245 deletions(-) diff --git a/cmake/project.metadata.cmake b/cmake/project.metadata.cmake index e871d5b5e3..ccd0464851 100644 --- a/cmake/project.metadata.cmake +++ b/cmake/project.metadata.cmake @@ -11,7 +11,7 @@ set(DEX_VERSION "0.7.0") set(DEX_SUPPORT_PAGE "https://support.komodoplatform.com/support/home") set(DEX_DISCORD "https://komodoplatform.com/discord") set(DEX_TWITTER "https://twitter.com/AtomicDEX") -set(DEX_PRIMARY_COIN "LTC-segwit") ## Main coin of the DEX, will be enabled by default and will be the default left ticker for trading +set(DEX_PRIMARY_COIN "LTC-segwit") ## Main coin of the DEX, will be enabled by default and will be the default left ticker for trading set(DEX_SECOND_PRIMARY_COIN "KMD") ## Second main coin of the DEX, will be enabled by default and will be the default right ticker for trading set(DEX_REPOSITORY_OWNER ${DEX_COMPANY}) set(DEX_REPOSITORY_NAME "komodo-wallet-desktop") diff --git a/src/app/app.cpp b/src/app/app.cpp index d3dee68e4e..8f7df9c613 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/app/app.hpp b/src/app/app.hpp index 20befe3020..69d6f095cb 100644 --- a/src/app/app.hpp +++ b/src/app/app.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/app/main.prerequisites.hpp b/src/app/main.prerequisites.hpp index 1a57f1b0ba..d3e6921ca3 100644 --- a/src/app/main.prerequisites.hpp +++ b/src/app/main.prerequisites.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2023 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/api.call.hpp b/src/core/atomicdex/api/api.call.hpp index 9f824ed8cc..cd2eff6173 100644 --- a/src/core/atomicdex/api/api.call.hpp +++ b/src/core/atomicdex/api/api.call.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/coinpaprika/coinpaprika.cpp b/src/core/atomicdex/api/coinpaprika/coinpaprika.cpp index 1883d69b9f..0287e13302 100644 --- a/src/core/atomicdex/api/coinpaprika/coinpaprika.cpp +++ b/src/core/atomicdex/api/coinpaprika/coinpaprika.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/coinpaprika/coinpaprika.hpp b/src/core/atomicdex/api/coinpaprika/coinpaprika.hpp index df9f2a20ab..3650d3f733 100644 --- a/src/core/atomicdex/api/coinpaprika/coinpaprika.hpp +++ b/src/core/atomicdex/api/coinpaprika/coinpaprika.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/faucet/faucet.cpp b/src/core/atomicdex/api/faucet/faucet.cpp index 06e2e44cb3..7f9d5567ae 100644 --- a/src/core/atomicdex/api/faucet/faucet.cpp +++ b/src/core/atomicdex/api/faucet/faucet.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/faucet/faucet.hpp b/src/core/atomicdex/api/faucet/faucet.hpp index 8a874bf23b..fe3152ed5d 100644 --- a/src/core/atomicdex/api/faucet/faucet.hpp +++ b/src/core/atomicdex/api/faucet/faucet.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/address_format.cpp b/src/core/atomicdex/api/mm2/address_format.cpp index a8ad2c7217..d4320ed7d7 100644 --- a/src/core/atomicdex/api/mm2/address_format.cpp +++ b/src/core/atomicdex/api/mm2/address_format.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/address_format.hpp b/src/core/atomicdex/api/mm2/address_format.hpp index ca0d16037b..7b68961d12 100644 --- a/src/core/atomicdex/api/mm2/address_format.hpp +++ b/src/core/atomicdex/api/mm2/address_format.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/balance_infos.cpp b/src/core/atomicdex/api/mm2/balance_infos.cpp index 1c2e6d3274..9140372b71 100644 --- a/src/core/atomicdex/api/mm2/balance_infos.cpp +++ b/src/core/atomicdex/api/mm2/balance_infos.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/balance_infos.hpp b/src/core/atomicdex/api/mm2/balance_infos.hpp index 5173db0f8a..eece30234c 100644 --- a/src/core/atomicdex/api/mm2/balance_infos.hpp +++ b/src/core/atomicdex/api/mm2/balance_infos.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/generics.cpp b/src/core/atomicdex/api/mm2/generics.cpp index 9c64cb71c0..a8a0c0ddb4 100644 --- a/src/core/atomicdex/api/mm2/generics.cpp +++ b/src/core/atomicdex/api/mm2/generics.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/generics.hpp b/src/core/atomicdex/api/mm2/generics.hpp index f8dc01c009..333180d538 100644 --- a/src/core/atomicdex/api/mm2/generics.hpp +++ b/src/core/atomicdex/api/mm2/generics.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/mm2.client.cpp b/src/core/atomicdex/api/mm2/mm2.client.cpp index 26119feecf..1ebd7f2c7b 100644 --- a/src/core/atomicdex/api/mm2/mm2.client.cpp +++ b/src/core/atomicdex/api/mm2/mm2.client.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/mm2.cpp b/src/core/atomicdex/api/mm2/mm2.cpp index cffd3b1b43..0971464177 100644 --- a/src/core/atomicdex/api/mm2/mm2.cpp +++ b/src/core/atomicdex/api/mm2/mm2.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/mm2.error.code.cpp b/src/core/atomicdex/api/mm2/mm2.error.code.cpp index 14b1e408f9..f77edf559c 100644 --- a/src/core/atomicdex/api/mm2/mm2.error.code.cpp +++ b/src/core/atomicdex/api/mm2/mm2.error.code.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/mm2.error.code.hpp b/src/core/atomicdex/api/mm2/mm2.error.code.hpp index 98a76f2688..a21501285a 100644 --- a/src/core/atomicdex/api/mm2/mm2.error.code.hpp +++ b/src/core/atomicdex/api/mm2/mm2.error.code.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/mm2.hpp b/src/core/atomicdex/api/mm2/mm2.hpp index b2f9bae3a6..2a0efe3c65 100644 --- a/src/core/atomicdex/api/mm2/mm2.hpp +++ b/src/core/atomicdex/api/mm2/mm2.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/orderbook.order.contents.cpp b/src/core/atomicdex/api/mm2/orderbook.order.contents.cpp index 0da85f01c7..388b67bb24 100644 --- a/src/core/atomicdex/api/mm2/orderbook.order.contents.cpp +++ b/src/core/atomicdex/api/mm2/orderbook.order.contents.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/orderbook.order.contents.hpp b/src/core/atomicdex/api/mm2/orderbook.order.contents.hpp index 48816560ce..b4cbc7798e 100644 --- a/src/core/atomicdex/api/mm2/orderbook.order.contents.hpp +++ b/src/core/atomicdex/api/mm2/orderbook.order.contents.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc.hpp b/src/core/atomicdex/api/mm2/rpc.hpp index 4573ed74fb..ae41949fec 100644 --- a/src/core/atomicdex/api/mm2/rpc.hpp +++ b/src/core/atomicdex/api/mm2/rpc.hpp @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright © 2013-2022 The Komodo Platform Developers. * +* Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.buy.cpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.buy.cpp index cfbd8008ca..06778770c5 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.buy.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.buy.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.buy.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.buy.hpp index 7475510754..5e31e108e4 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.buy.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.buy.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp index f41b6c6926..f08fb1bb6f 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp index e977294218..c3d545c57a 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.electrum.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp index 5db863ad55..a147bf72b8 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp index e5dbf8c4ff..d0b218bbbe 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.max_taker_vol.cpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.max_taker_vol.cpp index 9021091c33..d9de7d5700 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.max_taker_vol.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.max_taker_vol.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.max_taker_vol.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.max_taker_vol.hpp index 1f59d4a99f..14bf04af54 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.max_taker_vol.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.max_taker_vol.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_balance.cpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_balance.cpp index 6d0c3b7e27..ad79aad144 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_balance.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_balance.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_balance.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_balance.hpp index 10c403fc12..a3e4db1dfb 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_balance.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.my_balance.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.sell.cpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.sell.cpp index a39a17eace..6779feb367 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.sell.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.sell.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.sell.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.sell.hpp index 8c5e3d66b1..c2a1551731 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.sell.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.sell.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.setprice.cpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.setprice.cpp index 85cd7cffc9..a9d0816d74 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.setprice.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.setprice.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.setprice.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.setprice.hpp index fbf1964d6f..8eb234e274 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.setprice.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.setprice.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.cpp index c13786254b..ba5dd40660 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp index eae52fead5..0c9be72572 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.bestorders.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp index d647ab818c..6cabbe2f72 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_slp_rpc.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp index cc950ebebd..86d7525f1d 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.enable_tendermint_token.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.cpp index fbcdc33b8d..acd53173d5 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp index 7a9b855f3a..98f15bc9f2 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.get_public_key.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp index a17ee52ca7..f80fa1ec55 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp index e504e85297..6b3a5bd3a2 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.orderbook.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.cancel.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.cancel.cpp index 1b78ed6a62..36a58b96b8 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.cancel.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.cancel.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.cancel.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.cancel.hpp index 7736cd4dd8..87bfcf4788 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.cancel.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.cancel.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.init.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.init.cpp index 330351e3f4..6a09fd06a3 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.init.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.init.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.init.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.init.hpp index c20bfc5b10..126e4eda94 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.init.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.init.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.status.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.status.cpp index 4ab759e7df..805939e270 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.status.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.status.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.status.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.status.hpp index cc66b70111..769719303c 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.status.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.enable_z_coin.status.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.init.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.init.cpp index d78b016255..6ca0f2a456 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.init.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.init.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.init.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.init.hpp index 88558fd1cd..01db2db54e 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.init.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.init.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.status.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.status.cpp index 6603c58bc5..e897f25426 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.status.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.status.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.status.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.status.hpp index a5cb3f356c..fce20944e9 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.status.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.task.withdraw.status.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.cpp index 9f9c7ee44e..baccc6e830 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.fwd.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.fwd.hpp index 1272653f43..ee8f2a57f5 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.fwd.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.fwd.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.hpp index 9f7b114934..9b888836b2 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.trade_preimage.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.z_coin_tx_history.cpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.z_coin_tx_history.cpp index 5e4af99af6..9b5053c85f 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.z_coin_tx_history.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.z_coin_tx_history.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.z_coin_tx_history.hpp b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.z_coin_tx_history.hpp index 4a2523f7f7..2f7c9ce8b9 100644 --- a/src/core/atomicdex/api/mm2/rpc_v2/rpc2.z_coin_tx_history.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v2/rpc2.z_coin_tx_history.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/trading.order.contents.cpp b/src/core/atomicdex/api/mm2/trading.order.contents.cpp index 3259863300..ea35f974d4 100644 --- a/src/core/atomicdex/api/mm2/trading.order.contents.cpp +++ b/src/core/atomicdex/api/mm2/trading.order.contents.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/trading.order.contents.hpp b/src/core/atomicdex/api/mm2/trading.order.contents.hpp index 076b5923eb..0bba41b80d 100644 --- a/src/core/atomicdex/api/mm2/trading.order.contents.hpp +++ b/src/core/atomicdex/api/mm2/trading.order.contents.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/utxo_merge_params.cpp b/src/core/atomicdex/api/mm2/utxo_merge_params.cpp index 8e01b1771a..2a5d29c474 100644 --- a/src/core/atomicdex/api/mm2/utxo_merge_params.cpp +++ b/src/core/atomicdex/api/mm2/utxo_merge_params.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/api/mm2/utxo_merge_params.hpp b/src/core/atomicdex/api/mm2/utxo_merge_params.hpp index cb6dd6f693..db30ee5008 100644 --- a/src/core/atomicdex/api/mm2/utxo_merge_params.hpp +++ b/src/core/atomicdex/api/mm2/utxo_merge_params.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/addressbook.cfg.cpp b/src/core/atomicdex/config/addressbook.cfg.cpp index fbcd97b28b..f5a77622b7 100644 --- a/src/core/atomicdex/config/addressbook.cfg.cpp +++ b/src/core/atomicdex/config/addressbook.cfg.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/addressbook.cfg.hpp b/src/core/atomicdex/config/addressbook.cfg.hpp index eda6b03a42..86df304cdc 100644 --- a/src/core/atomicdex/config/addressbook.cfg.hpp +++ b/src/core/atomicdex/config/addressbook.cfg.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/app.cfg.cpp b/src/core/atomicdex/config/app.cfg.cpp index 9790276baa..78ec9fda01 100644 --- a/src/core/atomicdex/config/app.cfg.cpp +++ b/src/core/atomicdex/config/app.cfg.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/app.cfg.hpp b/src/core/atomicdex/config/app.cfg.hpp index ba52c13d1a..550a182386 100644 --- a/src/core/atomicdex/config/app.cfg.hpp +++ b/src/core/atomicdex/config/app.cfg.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/coins.cfg.cpp b/src/core/atomicdex/config/coins.cfg.cpp index cb0a3982fb..f634f1b837 100644 --- a/src/core/atomicdex/config/coins.cfg.cpp +++ b/src/core/atomicdex/config/coins.cfg.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/coins.cfg.hpp b/src/core/atomicdex/config/coins.cfg.hpp index bfeb60ee82..101a46a5e2 100644 --- a/src/core/atomicdex/config/coins.cfg.hpp +++ b/src/core/atomicdex/config/coins.cfg.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/electrum.cfg.cpp b/src/core/atomicdex/config/electrum.cfg.cpp index cd4f97aeed..985544b712 100644 --- a/src/core/atomicdex/config/electrum.cfg.cpp +++ b/src/core/atomicdex/config/electrum.cfg.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/electrum.cfg.hpp b/src/core/atomicdex/config/electrum.cfg.hpp index 77e873c25d..2a91e700b8 100644 --- a/src/core/atomicdex/config/electrum.cfg.hpp +++ b/src/core/atomicdex/config/electrum.cfg.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/enable.cfg.cpp b/src/core/atomicdex/config/enable.cfg.cpp index 5e918c417c..47580a3f12 100644 --- a/src/core/atomicdex/config/enable.cfg.cpp +++ b/src/core/atomicdex/config/enable.cfg.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/enable.cfg.hpp b/src/core/atomicdex/config/enable.cfg.hpp index 7a56d35685..94e11e7736 100644 --- a/src/core/atomicdex/config/enable.cfg.hpp +++ b/src/core/atomicdex/config/enable.cfg.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/mm2.cfg.hpp b/src/core/atomicdex/config/mm2.cfg.hpp index 2abc385f85..21c7aeb62c 100644 --- a/src/core/atomicdex/config/mm2.cfg.hpp +++ b/src/core/atomicdex/config/mm2.cfg.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/wallet.cfg.cpp b/src/core/atomicdex/config/wallet.cfg.cpp index ebdbe05830..e64643ec53 100644 --- a/src/core/atomicdex/config/wallet.cfg.cpp +++ b/src/core/atomicdex/config/wallet.cfg.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/config/wallet.cfg.hpp b/src/core/atomicdex/config/wallet.cfg.hpp index 50b4aa7b2c..6e6f21e5f6 100644 --- a/src/core/atomicdex/config/wallet.cfg.hpp +++ b/src/core/atomicdex/config/wallet.cfg.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/constants/qt.actions.hpp b/src/core/atomicdex/constants/qt.actions.hpp index aa2ecd5ebe..9e97b4c48d 100644 --- a/src/core/atomicdex/constants/qt.actions.hpp +++ b/src/core/atomicdex/constants/qt.actions.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/constants/qt.coins.enums.cpp b/src/core/atomicdex/constants/qt.coins.enums.cpp index 593777550d..310a98a49f 100644 --- a/src/core/atomicdex/constants/qt.coins.enums.cpp +++ b/src/core/atomicdex/constants/qt.coins.enums.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/constants/qt.coins.enums.hpp b/src/core/atomicdex/constants/qt.coins.enums.hpp index be0c32e824..a89c819a58 100644 --- a/src/core/atomicdex/constants/qt.coins.enums.hpp +++ b/src/core/atomicdex/constants/qt.coins.enums.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/data/wallet/qt.portfolio.data.hpp b/src/core/atomicdex/data/wallet/qt.portfolio.data.hpp index 7cd0e32c8a..f22cbfed7a 100644 --- a/src/core/atomicdex/data/wallet/qt.portfolio.data.hpp +++ b/src/core/atomicdex/data/wallet/qt.portfolio.data.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/events/events.hpp b/src/core/atomicdex/events/events.hpp index 3e00e35127..47127603bd 100644 --- a/src/core/atomicdex/events/events.hpp +++ b/src/core/atomicdex/events/events.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/events/qt.events.hpp b/src/core/atomicdex/events/qt.events.hpp index 613e600f7d..c3181f1bb4 100644 --- a/src/core/atomicdex/events/qt.events.hpp +++ b/src/core/atomicdex/events/qt.events.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/managers/addressbook.manager.cpp b/src/core/atomicdex/managers/addressbook.manager.cpp index e938014101..d9c0282ee2 100644 --- a/src/core/atomicdex/managers/addressbook.manager.cpp +++ b/src/core/atomicdex/managers/addressbook.manager.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/managers/addressbook.manager.hpp b/src/core/atomicdex/managers/addressbook.manager.hpp index af51cb7468..7151af9940 100644 --- a/src/core/atomicdex/managers/addressbook.manager.hpp +++ b/src/core/atomicdex/managers/addressbook.manager.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/managers/notification.manager.cpp b/src/core/atomicdex/managers/notification.manager.cpp index e57fb22971..4631302b55 100644 --- a/src/core/atomicdex/managers/notification.manager.cpp +++ b/src/core/atomicdex/managers/notification.manager.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/managers/notification.manager.hpp b/src/core/atomicdex/managers/notification.manager.hpp index a6c201cf4f..4e8c617796 100644 --- a/src/core/atomicdex/managers/notification.manager.hpp +++ b/src/core/atomicdex/managers/notification.manager.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/managers/qt.wallet.manager.cpp b/src/core/atomicdex/managers/qt.wallet.manager.cpp index b1758179e7..bb73aef9a2 100644 --- a/src/core/atomicdex/managers/qt.wallet.manager.cpp +++ b/src/core/atomicdex/managers/qt.wallet.manager.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/managers/qt.wallet.manager.hpp b/src/core/atomicdex/managers/qt.wallet.manager.hpp index 4ad11710e3..a40b70a59c 100644 --- a/src/core/atomicdex/managers/qt.wallet.manager.hpp +++ b/src/core/atomicdex/managers/qt.wallet.manager.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.addressbook.contact.model.cpp b/src/core/atomicdex/models/qt.addressbook.contact.model.cpp index 4464d0e674..9fd72c8459 100644 --- a/src/core/atomicdex/models/qt.addressbook.contact.model.cpp +++ b/src/core/atomicdex/models/qt.addressbook.contact.model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.addressbook.contact.model.hpp b/src/core/atomicdex/models/qt.addressbook.contact.model.hpp index c07a4ffec3..ec5c7d65d8 100644 --- a/src/core/atomicdex/models/qt.addressbook.contact.model.hpp +++ b/src/core/atomicdex/models/qt.addressbook.contact.model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.addressbook.contact.proxy.filter.model.cpp b/src/core/atomicdex/models/qt.addressbook.contact.proxy.filter.model.cpp index 058e78409f..ca4cc7e1d7 100644 --- a/src/core/atomicdex/models/qt.addressbook.contact.proxy.filter.model.cpp +++ b/src/core/atomicdex/models/qt.addressbook.contact.proxy.filter.model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.addressbook.contact.proxy.filter.model.hpp b/src/core/atomicdex/models/qt.addressbook.contact.proxy.filter.model.hpp index 21c4279889..df0e61d6ce 100644 --- a/src/core/atomicdex/models/qt.addressbook.contact.proxy.filter.model.hpp +++ b/src/core/atomicdex/models/qt.addressbook.contact.proxy.filter.model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.addressbook.model.cpp b/src/core/atomicdex/models/qt.addressbook.model.cpp index ed372b198d..1953f4dc49 100644 --- a/src/core/atomicdex/models/qt.addressbook.model.cpp +++ b/src/core/atomicdex/models/qt.addressbook.model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.addressbook.model.hpp b/src/core/atomicdex/models/qt.addressbook.model.hpp index 309d82bcd2..0b242f5af7 100644 --- a/src/core/atomicdex/models/qt.addressbook.model.hpp +++ b/src/core/atomicdex/models/qt.addressbook.model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.addressbook.proxy.filter.model.cpp b/src/core/atomicdex/models/qt.addressbook.proxy.filter.model.cpp index 5fd394aecf..bc3bf78aa1 100644 --- a/src/core/atomicdex/models/qt.addressbook.proxy.filter.model.cpp +++ b/src/core/atomicdex/models/qt.addressbook.proxy.filter.model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.addressbook.proxy.filter.model.hpp b/src/core/atomicdex/models/qt.addressbook.proxy.filter.model.hpp index b7f3d2e01b..58baee1946 100644 --- a/src/core/atomicdex/models/qt.addressbook.proxy.filter.model.hpp +++ b/src/core/atomicdex/models/qt.addressbook.proxy.filter.model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.global.coins.cfg.model.cpp b/src/core/atomicdex/models/qt.global.coins.cfg.model.cpp index 9af4ddcdf9..65ca718a44 100644 --- a/src/core/atomicdex/models/qt.global.coins.cfg.model.cpp +++ b/src/core/atomicdex/models/qt.global.coins.cfg.model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.global.coins.cfg.model.hpp b/src/core/atomicdex/models/qt.global.coins.cfg.model.hpp index 17ceb76bbb..a3ae85fb2e 100644 --- a/src/core/atomicdex/models/qt.global.coins.cfg.model.hpp +++ b/src/core/atomicdex/models/qt.global.coins.cfg.model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.global.coins.cfg.proxy.filter.model.cpp b/src/core/atomicdex/models/qt.global.coins.cfg.proxy.filter.model.cpp index b72dc71f48..44c232e4ea 100644 --- a/src/core/atomicdex/models/qt.global.coins.cfg.proxy.filter.model.cpp +++ b/src/core/atomicdex/models/qt.global.coins.cfg.proxy.filter.model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.global.coins.cfg.proxy.filter.model.hpp b/src/core/atomicdex/models/qt.global.coins.cfg.proxy.filter.model.hpp index 49e53f92bb..45fb8c0c83 100644 --- a/src/core/atomicdex/models/qt.global.coins.cfg.proxy.filter.model.hpp +++ b/src/core/atomicdex/models/qt.global.coins.cfg.proxy.filter.model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.orderbook.model.cpp b/src/core/atomicdex/models/qt.orderbook.model.cpp index da39538c5e..2aa52b3d4f 100644 --- a/src/core/atomicdex/models/qt.orderbook.model.cpp +++ b/src/core/atomicdex/models/qt.orderbook.model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.orderbook.model.hpp b/src/core/atomicdex/models/qt.orderbook.model.hpp index 30b8e37004..2ec3b7ef84 100644 --- a/src/core/atomicdex/models/qt.orderbook.model.hpp +++ b/src/core/atomicdex/models/qt.orderbook.model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.orderbook.proxy.model.cpp b/src/core/atomicdex/models/qt.orderbook.proxy.model.cpp index 16b1a350d4..28b47ab518 100644 --- a/src/core/atomicdex/models/qt.orderbook.proxy.model.cpp +++ b/src/core/atomicdex/models/qt.orderbook.proxy.model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.orderbook.proxy.model.hpp b/src/core/atomicdex/models/qt.orderbook.proxy.model.hpp index 896972d1a8..357219bc04 100644 --- a/src/core/atomicdex/models/qt.orderbook.proxy.model.hpp +++ b/src/core/atomicdex/models/qt.orderbook.proxy.model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.orders.model.cpp b/src/core/atomicdex/models/qt.orders.model.cpp index f9a24767c9..72ba1c6444 100644 --- a/src/core/atomicdex/models/qt.orders.model.cpp +++ b/src/core/atomicdex/models/qt.orders.model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.orders.model.hpp b/src/core/atomicdex/models/qt.orders.model.hpp index b3dfbe7b83..bb00288a28 100644 --- a/src/core/atomicdex/models/qt.orders.model.hpp +++ b/src/core/atomicdex/models/qt.orders.model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.orders.proxy.model.cpp b/src/core/atomicdex/models/qt.orders.proxy.model.cpp index b18f0cd7ed..f66ce759b8 100644 --- a/src/core/atomicdex/models/qt.orders.proxy.model.cpp +++ b/src/core/atomicdex/models/qt.orders.proxy.model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.orders.proxy.model.hpp b/src/core/atomicdex/models/qt.orders.proxy.model.hpp index 49dde4094b..e990641cd0 100644 --- a/src/core/atomicdex/models/qt.orders.proxy.model.hpp +++ b/src/core/atomicdex/models/qt.orders.proxy.model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.portfolio.model.cpp b/src/core/atomicdex/models/qt.portfolio.model.cpp index d76c129977..9b320fb3f0 100644 --- a/src/core/atomicdex/models/qt.portfolio.model.cpp +++ b/src/core/atomicdex/models/qt.portfolio.model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.portfolio.model.hpp b/src/core/atomicdex/models/qt.portfolio.model.hpp index fb0d99bcc7..5fc90f0175 100644 --- a/src/core/atomicdex/models/qt.portfolio.model.hpp +++ b/src/core/atomicdex/models/qt.portfolio.model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.portfolio.proxy.filter.model.cpp b/src/core/atomicdex/models/qt.portfolio.proxy.filter.model.cpp index ad39cc4b49..aba4a97cda 100644 --- a/src/core/atomicdex/models/qt.portfolio.proxy.filter.model.cpp +++ b/src/core/atomicdex/models/qt.portfolio.proxy.filter.model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/qt.portfolio.proxy.filter.model.hpp b/src/core/atomicdex/models/qt.portfolio.proxy.filter.model.hpp index eee7d172e4..34a84ebc2f 100644 --- a/src/core/atomicdex/models/qt.portfolio.proxy.filter.model.hpp +++ b/src/core/atomicdex/models/qt.portfolio.proxy.filter.model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/transactions_model.cpp b/src/core/atomicdex/models/transactions_model.cpp index 26245134a0..9ee44684e7 100644 --- a/src/core/atomicdex/models/transactions_model.cpp +++ b/src/core/atomicdex/models/transactions_model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/transactions_model.hpp b/src/core/atomicdex/models/transactions_model.hpp index b76b85a8fd..7e40de0728 100644 --- a/src/core/atomicdex/models/transactions_model.hpp +++ b/src/core/atomicdex/models/transactions_model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/transactions_proxy_model.cpp b/src/core/atomicdex/models/transactions_proxy_model.cpp index fcbc68ecbc..3b65876481 100644 --- a/src/core/atomicdex/models/transactions_proxy_model.cpp +++ b/src/core/atomicdex/models/transactions_proxy_model.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/models/transactions_proxy_model.hpp b/src/core/atomicdex/models/transactions_proxy_model.hpp index ff6cdf9a54..fa33f18429 100644 --- a/src/core/atomicdex/models/transactions_proxy_model.hpp +++ b/src/core/atomicdex/models/transactions_proxy_model.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/qt.addressbook.page.cpp b/src/core/atomicdex/pages/qt.addressbook.page.cpp index 8822e87bb0..90d54971ef 100644 --- a/src/core/atomicdex/pages/qt.addressbook.page.cpp +++ b/src/core/atomicdex/pages/qt.addressbook.page.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/qt.addressbook.page.hpp b/src/core/atomicdex/pages/qt.addressbook.page.hpp index 4f1dee71bf..61e37deb58 100644 --- a/src/core/atomicdex/pages/qt.addressbook.page.hpp +++ b/src/core/atomicdex/pages/qt.addressbook.page.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/qt.portfolio.page.cpp b/src/core/atomicdex/pages/qt.portfolio.page.cpp index 4306f26f2f..6969e28ff1 100644 --- a/src/core/atomicdex/pages/qt.portfolio.page.cpp +++ b/src/core/atomicdex/pages/qt.portfolio.page.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/qt.portfolio.page.hpp b/src/core/atomicdex/pages/qt.portfolio.page.hpp index 7aa469e625..7df303ed2f 100644 --- a/src/core/atomicdex/pages/qt.portfolio.page.hpp +++ b/src/core/atomicdex/pages/qt.portfolio.page.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/qt.settings.page.cpp b/src/core/atomicdex/pages/qt.settings.page.cpp index af5dbb6cd7..aa29ac2992 100644 --- a/src/core/atomicdex/pages/qt.settings.page.cpp +++ b/src/core/atomicdex/pages/qt.settings.page.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/qt.settings.page.hpp b/src/core/atomicdex/pages/qt.settings.page.hpp index b6f765405f..2c2ab8b7b5 100644 --- a/src/core/atomicdex/pages/qt.settings.page.hpp +++ b/src/core/atomicdex/pages/qt.settings.page.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/qt.trading.page.cpp b/src/core/atomicdex/pages/qt.trading.page.cpp index 8489fc22f4..2eda40fff9 100644 --- a/src/core/atomicdex/pages/qt.trading.page.cpp +++ b/src/core/atomicdex/pages/qt.trading.page.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/qt.trading.page.hpp b/src/core/atomicdex/pages/qt.trading.page.hpp index 6a6599e328..af97e46860 100644 --- a/src/core/atomicdex/pages/qt.trading.page.hpp +++ b/src/core/atomicdex/pages/qt.trading.page.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/widgets/dex/qt.market.pairs.cpp b/src/core/atomicdex/pages/widgets/dex/qt.market.pairs.cpp index ff7a993adb..f7b7068347 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.market.pairs.cpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.market.pairs.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/widgets/dex/qt.market.pairs.hpp b/src/core/atomicdex/pages/widgets/dex/qt.market.pairs.hpp index 54690adcd8..6751da26ec 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.market.pairs.hpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.market.pairs.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/widgets/dex/qt.multi.orders.widget.cpp b/src/core/atomicdex/pages/widgets/dex/qt.multi.orders.widget.cpp index 6763dc8ee7..a9fdbb804a 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.multi.orders.widget.cpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.multi.orders.widget.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/widgets/dex/qt.multi.orders.widget.hpp b/src/core/atomicdex/pages/widgets/dex/qt.multi.orders.widget.hpp index 4db8fcf876..1093f22f3c 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.multi.orders.widget.hpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.multi.orders.widget.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp index 24468850ba..29a50e8adf 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp index 29d74e5afd..21cd4ae3bb 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.orderbook.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/widgets/dex/qt.orders.widget.cpp b/src/core/atomicdex/pages/widgets/dex/qt.orders.widget.cpp index c4181ada48..3ff8cd10cd 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.orders.widget.cpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.orders.widget.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pages/widgets/dex/qt.orders.widget.hpp b/src/core/atomicdex/pages/widgets/dex/qt.orders.widget.hpp index 5de4b4a77a..0bc0d4c377 100644 --- a/src/core/atomicdex/pages/widgets/dex/qt.orders.widget.hpp +++ b/src/core/atomicdex/pages/widgets/dex/qt.orders.widget.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/pch.hpp b/src/core/atomicdex/pch.hpp index 510acf6123..95a55a7c8f 100644 --- a/src/core/atomicdex/pch.hpp +++ b/src/core/atomicdex/pch.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/platform/osx/manager.hpp b/src/core/atomicdex/platform/osx/manager.hpp index 0122bd872b..9c8bf732d2 100644 --- a/src/core/atomicdex/platform/osx/manager.hpp +++ b/src/core/atomicdex/platform/osx/manager.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/platform/osx/manager.mm b/src/core/atomicdex/platform/osx/manager.mm index ebf098b402..29592093dd 100644 --- a/src/core/atomicdex/platform/osx/manager.mm +++ b/src/core/atomicdex/platform/osx/manager.mm @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/exporter/exporter.service.cpp b/src/core/atomicdex/services/exporter/exporter.service.cpp index 123847dd6d..604d7a8287 100644 --- a/src/core/atomicdex/services/exporter/exporter.service.cpp +++ b/src/core/atomicdex/services/exporter/exporter.service.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/exporter/exporter.service.hpp b/src/core/atomicdex/services/exporter/exporter.service.hpp index 2199699b63..96d0ab50be 100644 --- a/src/core/atomicdex/services/exporter/exporter.service.hpp +++ b/src/core/atomicdex/services/exporter/exporter.service.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/internet/internet.checker.service.cpp b/src/core/atomicdex/services/internet/internet.checker.service.cpp index 60c1b0f378..9afafd488f 100644 --- a/src/core/atomicdex/services/internet/internet.checker.service.cpp +++ b/src/core/atomicdex/services/internet/internet.checker.service.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/internet/internet.checker.service.hpp b/src/core/atomicdex/services/internet/internet.checker.service.hpp index 12fd00ec49..553a2fcd95 100644 --- a/src/core/atomicdex/services/internet/internet.checker.service.hpp +++ b/src/core/atomicdex/services/internet/internet.checker.service.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/mm2/auto.update.maker.order.service.cpp b/src/core/atomicdex/services/mm2/auto.update.maker.order.service.cpp index 0e3931fddc..754b01dfe1 100644 --- a/src/core/atomicdex/services/mm2/auto.update.maker.order.service.cpp +++ b/src/core/atomicdex/services/mm2/auto.update.maker.order.service.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/mm2/auto.update.maker.order.service.hpp b/src/core/atomicdex/services/mm2/auto.update.maker.order.service.hpp index b2fc78ae7a..a39dd8f85e 100644 --- a/src/core/atomicdex/services/mm2/auto.update.maker.order.service.hpp +++ b/src/core/atomicdex/services/mm2/auto.update.maker.order.service.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index b3f7461c9d..c71e891bf4 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2023 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/mm2/mm2.service.hpp b/src/core/atomicdex/services/mm2/mm2.service.hpp index 2fea97b8f5..59f1c323fd 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.hpp +++ b/src/core/atomicdex/services/mm2/mm2.service.hpp @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright © 2013-2023 The Komodo Platform Developers. * +* Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.cpp b/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.cpp index 677a3a8c33..f16c4a179a 100644 --- a/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.cpp +++ b/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.hpp b/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.hpp index 530be796a8..ab8ac6d43b 100644 --- a/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.hpp +++ b/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/price/defi.stats.cpp b/src/core/atomicdex/services/price/defi.stats.cpp index 274f3a378c..22bbd98d4c 100644 --- a/src/core/atomicdex/services/price/defi.stats.cpp +++ b/src/core/atomicdex/services/price/defi.stats.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2023 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/price/defi.stats.hpp b/src/core/atomicdex/services/price/defi.stats.hpp index 537cf8ae29..61941aec41 100644 --- a/src/core/atomicdex/services/price/defi.stats.hpp +++ b/src/core/atomicdex/services/price/defi.stats.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/price/global.provider.cpp b/src/core/atomicdex/services/price/global.provider.cpp index 75ec404bbf..5156033aa3 100644 --- a/src/core/atomicdex/services/price/global.provider.cpp +++ b/src/core/atomicdex/services/price/global.provider.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/price/global.provider.hpp b/src/core/atomicdex/services/price/global.provider.hpp index d5b3c888b2..e4234e7fbe 100644 --- a/src/core/atomicdex/services/price/global.provider.hpp +++ b/src/core/atomicdex/services/price/global.provider.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/price/orderbook.scanner.service.cpp b/src/core/atomicdex/services/price/orderbook.scanner.service.cpp index 0909c4a9fe..76c08a5209 100644 --- a/src/core/atomicdex/services/price/orderbook.scanner.service.cpp +++ b/src/core/atomicdex/services/price/orderbook.scanner.service.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/price/orderbook.scanner.service.hpp b/src/core/atomicdex/services/price/orderbook.scanner.service.hpp index 93555f4e36..9a7896c68f 100644 --- a/src/core/atomicdex/services/price/orderbook.scanner.service.hpp +++ b/src/core/atomicdex/services/price/orderbook.scanner.service.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/update/update.checker.service.cpp b/src/core/atomicdex/services/update/update.checker.service.cpp index e366ae316e..779d09121c 100644 --- a/src/core/atomicdex/services/update/update.checker.service.cpp +++ b/src/core/atomicdex/services/update/update.checker.service.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/update/update.checker.service.hpp b/src/core/atomicdex/services/update/update.checker.service.hpp index b6c6eed91f..c2956708c1 100644 --- a/src/core/atomicdex/services/update/update.checker.service.hpp +++ b/src/core/atomicdex/services/update/update.checker.service.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/update/zcash.params.service.cpp b/src/core/atomicdex/services/update/zcash.params.service.cpp index 39f83d1d04..af8b1f5d29 100644 --- a/src/core/atomicdex/services/update/zcash.params.service.cpp +++ b/src/core/atomicdex/services/update/zcash.params.service.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/services/update/zcash.params.service.hpp b/src/core/atomicdex/services/update/zcash.params.service.hpp index d77cd453d1..14a6961a81 100644 --- a/src/core/atomicdex/services/update/zcash.params.service.hpp +++ b/src/core/atomicdex/services/update/zcash.params.service.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/cpprestsdk.utilities.cpp b/src/core/atomicdex/utilities/cpprestsdk.utilities.cpp index b300c9fa68..a7740282ba 100644 --- a/src/core/atomicdex/utilities/cpprestsdk.utilities.cpp +++ b/src/core/atomicdex/utilities/cpprestsdk.utilities.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/cpprestsdk.utilities.hpp b/src/core/atomicdex/utilities/cpprestsdk.utilities.hpp index 5da61abb47..5ce28c47dd 100644 --- a/src/core/atomicdex/utilities/cpprestsdk.utilities.hpp +++ b/src/core/atomicdex/utilities/cpprestsdk.utilities.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/global.utilities.hpp b/src/core/atomicdex/utilities/global.utilities.hpp index 89df4fa7f9..81004e44bd 100644 --- a/src/core/atomicdex/utilities/global.utilities.hpp +++ b/src/core/atomicdex/utilities/global.utilities.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/kill.cpp b/src/core/atomicdex/utilities/kill.cpp index b4b225b3fc..3b61a1115e 100644 --- a/src/core/atomicdex/utilities/kill.cpp +++ b/src/core/atomicdex/utilities/kill.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2023 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/kill.hpp b/src/core/atomicdex/utilities/kill.hpp index f295cb43b2..784c952ba1 100644 --- a/src/core/atomicdex/utilities/kill.hpp +++ b/src/core/atomicdex/utilities/kill.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2023 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/log.prerequisites.hpp b/src/core/atomicdex/utilities/log.prerequisites.hpp index 09fd2333ed..c3373a7258 100644 --- a/src/core/atomicdex/utilities/log.prerequisites.hpp +++ b/src/core/atomicdex/utilities/log.prerequisites.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2023 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/nlohmann.json.sax.private.cpp b/src/core/atomicdex/utilities/nlohmann.json.sax.private.cpp index 197ec731b4..9a7f1b9416 100644 --- a/src/core/atomicdex/utilities/nlohmann.json.sax.private.cpp +++ b/src/core/atomicdex/utilities/nlohmann.json.sax.private.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/qt.download.manager.cpp b/src/core/atomicdex/utilities/qt.download.manager.cpp index 040eea5ea2..66a817580c 100644 --- a/src/core/atomicdex/utilities/qt.download.manager.cpp +++ b/src/core/atomicdex/utilities/qt.download.manager.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/qt.download.manager.hpp b/src/core/atomicdex/utilities/qt.download.manager.hpp index 68823985d7..545a4af16c 100644 --- a/src/core/atomicdex/utilities/qt.download.manager.hpp +++ b/src/core/atomicdex/utilities/qt.download.manager.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/qt.utilities.cpp b/src/core/atomicdex/utilities/qt.utilities.cpp index 93a3a166c8..37e663833c 100644 --- a/src/core/atomicdex/utilities/qt.utilities.cpp +++ b/src/core/atomicdex/utilities/qt.utilities.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/qt.utilities.hpp b/src/core/atomicdex/utilities/qt.utilities.hpp index c388294017..75d8b0ecbd 100644 --- a/src/core/atomicdex/utilities/qt.utilities.hpp +++ b/src/core/atomicdex/utilities/qt.utilities.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/security.utilities.cpp b/src/core/atomicdex/utilities/security.utilities.cpp index d73a11fbb0..0fdcb101bd 100644 --- a/src/core/atomicdex/utilities/security.utilities.cpp +++ b/src/core/atomicdex/utilities/security.utilities.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/utilities/security.utilities.hpp b/src/core/atomicdex/utilities/security.utilities.hpp index 502eaadd8f..1972c40cb2 100644 --- a/src/core/atomicdex/utilities/security.utilities.hpp +++ b/src/core/atomicdex/utilities/security.utilities.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/core/atomicdex/version/version.hpp b/src/core/atomicdex/version/version.hpp index 2b30b76a47..a3126acaa9 100644 --- a/src/core/atomicdex/version/version.hpp +++ b/src/core/atomicdex/version/version.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/api/mm2/mm2.api.address_format.tests.cpp b/src/tests/api/mm2/mm2.api.address_format.tests.cpp index 116ecba165..7b43419bb9 100644 --- a/src/tests/api/mm2/mm2.api.address_format.tests.cpp +++ b/src/tests/api/mm2/mm2.api.address_format.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/api/mm2/mm2.api.balance_infos.tests.cpp b/src/tests/api/mm2/mm2.api.balance_infos.tests.cpp index b298bbfb6f..9b80fab15a 100644 --- a/src/tests/api/mm2/mm2.api.balance_infos.tests.cpp +++ b/src/tests/api/mm2/mm2.api.balance_infos.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/api/mm2/mm2.api.utxo_merge_params.tests.cpp b/src/tests/api/mm2/mm2.api.utxo_merge_params.tests.cpp index 5f7e996c52..de8d38ccda 100644 --- a/src/tests/api/mm2/mm2.api.utxo_merge_params.tests.cpp +++ b/src/tests/api/mm2/mm2.api.utxo_merge_params.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2022 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/atomic.dex.provider.cex.prices.api.tests.cpp b/src/tests/atomic.dex.provider.cex.prices.api.tests.cpp index 437679bbd6..89eeed478a 100644 --- a/src/tests/atomic.dex.provider.cex.prices.api.tests.cpp +++ b/src/tests/atomic.dex.provider.cex.prices.api.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/atomic.dex.provider.cex.prices.tests.cpp b/src/tests/atomic.dex.provider.cex.prices.tests.cpp index 9bfdf7d983..3f2772cd94 100644 --- a/src/tests/atomic.dex.provider.cex.prices.tests.cpp +++ b/src/tests/atomic.dex.provider.cex.prices.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/atomic.dex.qt.utilities.tests.cpp b/src/tests/atomic.dex.qt.utilities.tests.cpp index 3c1fc6e07d..4d16ff8eca 100644 --- a/src/tests/atomic.dex.qt.utilities.tests.cpp +++ b/src/tests/atomic.dex.qt.utilities.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/atomic.dex.tests.cpp b/src/tests/atomic.dex.tests.cpp index 936f62e1a8..a012cde492 100644 --- a/src/tests/atomic.dex.tests.cpp +++ b/src/tests/atomic.dex.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/atomic.dex.tests.hpp b/src/tests/atomic.dex.tests.hpp index 55f4ea8cd7..09fe13824f 100644 --- a/src/tests/atomic.dex.tests.hpp +++ b/src/tests/atomic.dex.tests.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/atomic.dex.wallet.config.tests.cpp b/src/tests/atomic.dex.wallet.config.tests.cpp index 9e4d97ed8b..987d46421d 100644 --- a/src/tests/atomic.dex.wallet.config.tests.cpp +++ b/src/tests/atomic.dex.wallet.config.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/config/addressbook.cfg.tests.cpp b/src/tests/config/addressbook.cfg.tests.cpp index 4bf3324c75..9c8c4789c0 100644 --- a/src/tests/config/addressbook.cfg.tests.cpp +++ b/src/tests/config/addressbook.cfg.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/managers/addressbook.manager.tests.cpp b/src/tests/managers/addressbook.manager.tests.cpp index 35126df0c5..55ff659a52 100644 --- a/src/tests/managers/addressbook.manager.tests.cpp +++ b/src/tests/managers/addressbook.manager.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/models/qt.addressbook.contact.model.tests.cpp b/src/tests/models/qt.addressbook.contact.model.tests.cpp index 1766bb4646..d3c5ab38e4 100644 --- a/src/tests/models/qt.addressbook.contact.model.tests.cpp +++ b/src/tests/models/qt.addressbook.contact.model.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/utilities/global.utilities.tests.cpp b/src/tests/utilities/global.utilities.tests.cpp index fa39364f1d..f79c747538 100644 --- a/src/tests/utilities/global.utilities.tests.cpp +++ b/src/tests/utilities/global.utilities.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/tests/utilities/qt.utilities.tests.cpp b/src/tests/utilities/qt.utilities.tests.cpp index 075196de34..0225216fa1 100644 --- a/src/tests/utilities/qt.utilities.tests.cpp +++ b/src/tests/utilities/qt.utilities.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/antara.core.real.path.tests.cpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/antara.core.real.path.tests.cpp index dc1d81a5c8..c051fb88d3 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/antara.core.real.path.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/antara.core.real.path.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/antara.core.tests.cpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/antara.core.tests.cpp index bba0c01796..cff16e1b66 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/antara.core.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/antara.core.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright �2013-2021 The Komodo Platform Developers.. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/api.scaling.cpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/api.scaling.cpp index 4219f864b5..8cf24205c4 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/api.scaling.cpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/api.scaling.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/api.scaling.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/api.scaling.hpp index aad67659e0..5095858787 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/api.scaling.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/api.scaling.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/emscripten/api.scaling.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/emscripten/api.scaling.hpp index 121f0699a7..9a827e224f 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/emscripten/api.scaling.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/emscripten/api.scaling.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/emscripten/real.path.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/emscripten/real.path.hpp index 9a7996695e..badf231b6c 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/emscripten/real.path.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/emscripten/real.path.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/linux/api.scaling.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/linux/api.scaling.hpp index 121f0699a7..9a827e224f 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/linux/api.scaling.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/linux/api.scaling.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/linux/real.path.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/linux/real.path.hpp index 4dde301d39..a4cf07cd3c 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/linux/real.path.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/linux/real.path.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/linux/security.authentification.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/linux/security.authentification.hpp index 976b7950e0..77ccf4ebcc 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/linux/security.authentification.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/linux/security.authentification.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/api.scaling.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/api.scaling.hpp index a52583c6fe..8af17d97fb 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/api.scaling.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/api.scaling.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/api.scaling.mm b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/api.scaling.mm index 6e7737d1d4..73ffb555f2 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/api.scaling.mm +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/api.scaling.mm @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/real.path.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/real.path.hpp index 8107be0100..9283f5c796 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/real.path.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/real.path.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/security.authentification.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/security.authentification.hpp index a6973486d7..bc75bcffa8 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/security.authentification.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/osx/security.authentification.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2019 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/posix/open.url.browser.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/posix/open.url.browser.hpp index 2ab77d3b60..09624ebe6f 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/posix/open.url.browser.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/posix/open.url.browser.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/api.scaling.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/api.scaling.hpp index 121f0699a7..9a827e224f 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/api.scaling.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/api.scaling.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/open.url.browser.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/open.url.browser.hpp index 832efba104..2c4f683f86 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/open.url.browser.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/open.url.browser.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/real.path.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/real.path.hpp index 10c186ae4d..f27d88e674 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/real.path.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/real.path.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/security.authentification.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/security.authentification.hpp index c89189e22c..bc75bcffa8 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/security.authentification.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/details/windows/security.authentification.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/open.url.browser.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/open.url.browser.hpp index fd73316031..7ea80e65b5 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/open.url.browser.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/open.url.browser.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/real.path.cpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/real.path.cpp index 0ea3135e24..b3cdd4c144 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/real.path.cpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/real.path.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/real.path.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/real.path.hpp index ae694f156b..2522007264 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/real.path.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/real.path.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/safe.refl.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/safe.refl.hpp index 45bbffb2fc..c969972293 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/safe.refl.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/safe.refl.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/version.hpp b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/version.hpp index ad35f7e7a1..16a11add69 100644 --- a/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/version.hpp +++ b/vendor/antara-gaming_sdk/modules/core/antara/gaming/core/version.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright � 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/all.components.hpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/all.components.hpp index 34334b752b..a42e2ce5cb 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/all.components.hpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/all.components.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.event.add.base.system.tests.cpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.event.add.base.system.tests.cpp index ce032b67c2..1e5df3dc85 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.event.add.base.system.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.event.add.base.system.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.system.manager.tests.cpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.system.manager.tests.cpp index ddcef28483..2e985df38a 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.system.manager.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.system.manager.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.system.tests.cpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.system.tests.cpp index 2468967864..07dd94c003 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.system.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.system.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.tests.cpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.tests.cpp index 27c9c88790..cff16e1b66 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/antara.ecs.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/base.system.cpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/base.system.cpp index fd4571c345..2196bc63fa 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/base.system.cpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/base.system.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/base.system.hpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/base.system.hpp index ad69d199f2..af433400ab 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/base.system.hpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/base.system.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/event.add.base.system.cpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/event.add.base.system.cpp index cd2f7dca53..4f791eda64 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/event.add.base.system.cpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/event.add.base.system.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/event.add.base.system.hpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/event.add.base.system.hpp index 64e852af02..a4ab293179 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/event.add.base.system.hpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/event.add.base.system.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/lambda.system.hpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/lambda.system.hpp index 20d8e4b69f..2168d3edc6 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/lambda.system.hpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/lambda.system.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/lambda.system.ipp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/lambda.system.ipp index ee1bd7c289..a9f95fca87 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/lambda.system.ipp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/lambda.system.ipp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.hpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.hpp index f23f62124e..c0229dbed9 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.hpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.ipp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.ipp index ce4730de89..95057ac304 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.ipp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.ipp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.manager.cpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.manager.cpp index f6f9fb36ad..ac5948e9a9 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.manager.cpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.manager.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.manager.hpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.manager.hpp index 8a61e1be3b..cbf93a1ad9 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.manager.hpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.manager.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.manager.ipp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.manager.ipp index 1195af2629..565ac1c2b9 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.manager.ipp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.manager.ipp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.type.hpp b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.type.hpp index 092713cab2..eace656991 100644 --- a/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.type.hpp +++ b/vendor/antara-gaming_sdk/modules/ecs/antara/gaming/ecs/system.type.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/all.events.hpp b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/all.events.hpp index caf66c3777..48436c86a2 100644 --- a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/all.events.hpp +++ b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/all.events.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.fatal.error.tests.cpp b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.fatal.error.tests.cpp index c6cc2cb989..1db8806c1c 100644 --- a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.fatal.error.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.fatal.error.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.quit.game.tests.cpp b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.quit.game.tests.cpp index 11da390f93..5c726d3258 100644 --- a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.quit.game.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.quit.game.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.tests.cpp b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.tests.cpp index 27c9c88790..cff16e1b66 100644 --- a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.type.traits.tests.cpp b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.type.traits.tests.cpp index f19d1feb07..049455d167 100644 --- a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.type.traits.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/antara.event.type.traits.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/event.invoker.hpp b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/event.invoker.hpp index cb7dc7040d..18ca5f54ff 100644 --- a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/event.invoker.hpp +++ b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/event.invoker.hpp @@ -1,6 +1,6 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/fatal.error.cpp b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/fatal.error.cpp index e0c0381197..ebf1fdb177 100644 --- a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/fatal.error.cpp +++ b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/fatal.error.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/fatal.error.hpp b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/fatal.error.hpp index 56d4e057a9..4109e638e3 100644 --- a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/fatal.error.hpp +++ b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/fatal.error.hpp @@ -1,6 +1,6 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/quit.game.cpp b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/quit.game.cpp index ce596b2258..f1b60c919e 100644 --- a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/quit.game.cpp +++ b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/quit.game.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/quit.game.hpp b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/quit.game.hpp index 28f2dd98ac..91de0b63ca 100644 --- a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/quit.game.hpp +++ b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/quit.game.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/start.game.hpp b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/start.game.hpp index 7c59ba54d7..96515b3137 100644 --- a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/start.game.hpp +++ b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/start.game.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/type.traits.hpp b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/type.traits.hpp index cd86a6773a..b720bae851 100644 --- a/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/type.traits.hpp +++ b/vendor/antara-gaming_sdk/modules/event/antara/gaming/event/type.traits.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/antara.timer.tests.cpp b/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/antara.timer.tests.cpp index 27c9c88790..cff16e1b66 100644 --- a/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/antara.timer.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/antara.timer.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/antara.timer.time.step.tests.cpp b/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/antara.timer.time.step.tests.cpp index 831c1fe073..3a0fd80221 100644 --- a/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/antara.timer.time.step.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/antara.timer.time.step.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/fps.hpp b/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/fps.hpp index 3136daf848..176bfa67fa 100644 --- a/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/fps.hpp +++ b/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/fps.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/time.step.cpp b/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/time.step.cpp index 4fdcbda153..53aefeae0b 100644 --- a/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/time.step.cpp +++ b/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/time.step.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/time.step.hpp b/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/time.step.hpp index 5275eb6715..e02b058465 100644 --- a/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/time.step.hpp +++ b/vendor/antara-gaming_sdk/modules/timer/antara/gaming/timer/time.step.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/antara.world.app.tests.cpp b/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/antara.world.app.tests.cpp index 39ee60096a..6ebb79564a 100644 --- a/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/antara.world.app.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/antara.world.app.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/antara.world.tests.cpp b/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/antara.world.tests.cpp index 27c9c88790..cff16e1b66 100644 --- a/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/antara.world.tests.cpp +++ b/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/antara.world.tests.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/world.app.cpp b/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/world.app.cpp index 80f332066d..6114d327d9 100644 --- a/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/world.app.cpp +++ b/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/world.app.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/world.app.hpp b/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/world.app.hpp index 747c0ded1a..caff7456e6 100644 --- a/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/world.app.hpp +++ b/vendor/antara-gaming_sdk/modules/world/antara/gaming/world/world.app.hpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2013-2021 The Komodo Platform Developers. * + * Copyright © 2013-2024 The Komodo Platform Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * From fe122ef4efe504ac1c3a18b955e89510af6f06a7 Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 20:32:03 +0800 Subject: [PATCH 28/43] update autogen ts files --- .../assets/languages/atomic_defi_de.ts | 58 +++++++++---------- .../assets/languages/atomic_defi_en.ts | 58 +++++++++---------- .../assets/languages/atomic_defi_es.ts | 58 +++++++++---------- .../assets/languages/atomic_defi_fr.ts | 58 +++++++++---------- .../assets/languages/atomic_defi_ru.ts | 58 +++++++++---------- .../assets/languages/atomic_defi_tr.ts | 58 +++++++++---------- 6 files changed, 174 insertions(+), 174 deletions(-) diff --git a/atomic_defi_design/assets/languages/atomic_defi_de.ts b/atomic_defi_design/assets/languages/atomic_defi_de.ts index c6777282d3..809575ff29 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_de.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_de.ts @@ -1511,67 +1511,67 @@ Beispiel: Kennwort = 1234 Suffix=56 Eingabe beim Login=123456Betrag eingeben - + Trading Fee Handelsgebühr - + Minimum Trading Amount Mindesthandelsbetrag - + Wallet %1 already exists WALLETNAME Brieftasche %1 existiert bereits - + %1 balance is lower than the fees amount: %2 %3 Das %1 Guthaben ist niedriger als der Gebührenbetrag: %2 %3 - + Tradable (after fees) %1 balance is lower than minimum trade amount Handelbares %1 Guthaben (nach Gebühren) ist niedriger als der Mindesthandelsbetrag - + Please fill the price field Bitte füllen Sie das Preisfeld aus - + Please fill the volume field - - + + Please wait for %1 to fully activate - - + + %1 volume is lower than minimum trade amount %1 Volumen ist niedriger als der minimale Handelsbetrag - - + + %1 needs to be enabled in order to use %2 %1 muss aktiviert werden, um %2 verwenden zu können - - + + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions Das %1 Guthaben muss finanziert werden, ein Guthaben größer Null ist erforderlich, um das Benzin von %2 Transaktionen zu bezahlen - + Unknown Error Unbekannter Fehler @@ -4557,7 +4557,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. @@ -4565,62 +4565,62 @@ This might take a few minutes... atomic_dex::wallet_page - + You do not have enough funds. Sie haben nicht genügend Kapital. - + %1 is not activated: click on the button to enable it or enable it manually %1 ist nicht aktiviert: Klicken Sie auf die Schaltfläche, um es zu aktivieren, oder aktivieren Sie es manuell - + You need to have %1 to pay the gas for %2 transactions. Sie benötigen %1, um das Benzin für %2 Transaktionen zu bezahlen. - + Checksum verification failed for %1. Überprüfung der Prüfsumme für %1 fehlgeschlagen. - + Invalid checksum for %1. Click the button to convert to mixed case address. Ungültige Prüfsumme für %1. Klicken Sie auf die Schaltfläche, um die Adresse in Groß-/Kleinschreibung umzuwandeln. - + Legacy address used for %1. Click the button to convert to a Cashaddress. Legacy-Adresse für %1 verwendet. Klicken Sie auf die Schaltfläche, um sie in eine Cashadresse umzuwandeln. - + %1 address must be prefixed with 0x %1 Adresse muss 0x vorangestellt werden - + %1 address length is invalid, please use a valid address. Länge der %1 Adresse ist ungültig, bitte verwenden Sie eine gültige Adresse. - + %1 address is invalid. %1 Adresse ist ungültig. - + Invalid checksum. Ungültige Prüfsumme. - + %1 address has invalid prefixes. %1 Adresse hat ungültige Vorsilben. - + Backend error: %1 Backend Fehler: %1 diff --git a/atomic_defi_design/assets/languages/atomic_defi_en.ts b/atomic_defi_design/assets/languages/atomic_defi_en.ts index e720e656bc..6b26606f0c 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_en.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_en.ts @@ -1510,67 +1510,67 @@ - + Trading Fee - + Minimum Trading Amount - + Wallet %1 already exists WALLETNAME - + %1 balance is lower than the fees amount: %2 %3 - + Tradable (after fees) %1 balance is lower than minimum trade amount - + Please fill the price field - + Please fill the volume field - - + + Please wait for %1 to fully activate - - + + %1 volume is lower than minimum trade amount - - + + %1 needs to be enabled in order to use %2 - - + + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions - + Unknown Error @@ -4539,7 +4539,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. @@ -4547,62 +4547,62 @@ This might take a few minutes... atomic_dex::wallet_page - + You do not have enough funds. - + %1 is not activated: click on the button to enable it or enable it manually - + You need to have %1 to pay the gas for %2 transactions. - + Checksum verification failed for %1. - + Invalid checksum for %1. Click the button to convert to mixed case address. - + Legacy address used for %1. Click the button to convert to a Cashaddress. - + %1 address must be prefixed with 0x - + %1 address length is invalid, please use a valid address. - + %1 address is invalid. - + Invalid checksum. - + %1 address has invalid prefixes. - + Backend error: %1 diff --git a/atomic_defi_design/assets/languages/atomic_defi_es.ts b/atomic_defi_design/assets/languages/atomic_defi_es.ts index 92a59ae6bf..ce74eb0cd6 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_es.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_es.ts @@ -1510,67 +1510,67 @@ Ingrese una cantidad - + Trading Fee Tarifa de Intercambio - + Minimum Trading Amount Cantidad Mínima de Intercambio - + Wallet %1 already exists WALLETNAME Monedero %1 ya existe - + %1 balance is lower than the fees amount: %2 %3 El saldo de %1 es inferior al monto de las tarifas: %2 %3 - + Tradable (after fees) %1 balance is lower than minimum trade amount El saldo de %1 (después de las tarifas) es inferior al monto mínimo de intercambio - + Please fill the price field Por favor complete el campo de precio - + Please fill the volume field Complete el campo de volumen - - + + Please wait for %1 to fully activate Espere a que %1 se active por completo - - + + %1 volume is lower than minimum trade amount El volumen de %1 es inferior al monto mínimo de intercambio - - + + %1 needs to be enabled in order to use %2 %1 debe habilitarse para usar %2 - - + + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions se debe rellenar el saldo de %1, se requiere un saldo distinto de cero para pagar el gas de %2 transacciones - + Unknown Error Error Desconocido @@ -4560,7 +4560,7 @@ Esto puede tardar unos minutos... atomic_dex::settings_page - + An error has occurred. Se ha producido un error. @@ -4568,62 +4568,62 @@ Esto puede tardar unos minutos... atomic_dex::wallet_page - + You do not have enough funds. No tiene fondos suficientes. - + %1 is not activated: click on the button to enable it or enable it manually %1 no está activado: haga clic en el botón para habilitarlo o habilítelo manualmente - + You need to have %1 to pay the gas for %2 transactions. Necesita tener %1 para pagar la gasolina de %2 transacciones. - + Checksum verification failed for %1. La verificación de la suma de comprobación falló para %1. - + Invalid checksum for %1. Click the button to convert to mixed case address. Suma de comprobación no válida para %1. Haga clic en el botón para convertir a dirección de mayúsculas y minúsculas. - + Legacy address used for %1. Click the button to convert to a Cashaddress. Dirección heredada utilizada para %1. Haga clic en el botón para convertir a una dirección de efectivo. - + %1 address must be prefixed with 0x La dirección %1 debe tener el prefijo 0x - + %1 address length is invalid, please use a valid address. La longitud de la dirección %1 no es válida, utilice una dirección válida. - + %1 address is invalid. La dirección %1 no es válida. - + Invalid checksum. Suma de comprobación no válida. - + %1 address has invalid prefixes. La dirección %1 tiene prefijos no válidos. - + Backend error: %1 Error de backend: %1 diff --git a/atomic_defi_design/assets/languages/atomic_defi_fr.ts b/atomic_defi_design/assets/languages/atomic_defi_fr.ts index 16cd54c466..843f2bf1f8 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_fr.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_fr.ts @@ -1510,67 +1510,67 @@ Entrez un montant - + Trading Fee Frais d'échanges - + Minimum Trading Amount Frais d'échange minimum - + Wallet %1 already exists WALLETNAME Le portefeuille %1 existe déjà - + %1 balance is lower than the fees amount: %2 %3 La %1 balance est inférieur aux frais: %2 %3 - + Tradable (after fees) %1 balance is lower than minimum trade amount Le solde négociable (après frais) %1 est inférieur au montant minimum de la transaction - + Please fill the price field Veuillez remplir le champ de prix - + Please fill the volume field - - + + Please wait for %1 to fully activate - - + + %1 volume is lower than minimum trade amount Le volume de %1 est inférieur au montant minimum de la transaction - - + + %1 needs to be enabled in order to use %2 %1 doit être activé pour utiliser %2 - - + + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions Le solde %1 doit être financé, un solde différent de zéro est requis pour payer les frais de transactions de %2 - + Unknown Error Erreur inconnue @@ -4541,7 +4541,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. @@ -4549,62 +4549,62 @@ This might take a few minutes... atomic_dex::wallet_page - + You do not have enough funds. Vous n'avez pas assez de fonds. - + %1 is not activated: click on the button to enable it or enable it manually %1 n'est pas activé : cliquez sur le bouton pour l'activer ou l'activer manuellement - + You need to have %1 to pay the gas for %2 transactions. Vous devez avoir %1 activée pour payer les frais de transactions de %2. - + Checksum verification failed for %1. Échec de la vérification du checksum de contrôle pour %1. - + Invalid checksum for %1. Click the button to convert to mixed case address. - + Legacy address used for %1. Click the button to convert to a Cashaddress. - + %1 address must be prefixed with 0x L'adresse %1 doit être précédée de 0x - + %1 address length is invalid, please use a valid address. La longueur de l'adresse %1 n'est pas valide, veuillez utiliser une adresse valide. - + %1 address is invalid. L'adresse %1 n'est pas valide. - + Invalid checksum. Somme de contrôle invalide. - + %1 address has invalid prefixes. L'adresse %1 a des préfixes non valides. - + Backend error: %1 Erreur de backend : %1 diff --git a/atomic_defi_design/assets/languages/atomic_defi_ru.ts b/atomic_defi_design/assets/languages/atomic_defi_ru.ts index 896a502ed2..57032eaf03 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_ru.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_ru.ts @@ -1516,67 +1516,67 @@ Введите количество - + Trading Fee Торговая комиссия - + Minimum Trading Amount Минимальный объем сделки - + Wallet %1 already exists WALLETNAME Кошелек %1 уже существует - + %1 balance is lower than the fees amount: %2 %3 %1 баланс менее чем размер комиссий: %2 %3 - + Tradable (after fees) %1 balance is lower than minimum trade amount Торгуемый (после комиссий) баланс %1 - меньше минимальной суммы сделки - + Please fill the price field Пожалуйста, укажите цену - + Please fill the volume field - - + + Please wait for %1 to fully activate - - + + %1 volume is lower than minimum trade amount Сумма %1 меньше минимальной суммы сделки - - + + %1 needs to be enabled in order to use %2 %1 должен быть активным для использования %2 - - + + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions нужно пополнить баланс %1 для оплаты газа %2 транзакций - + Unknown Error Неизвестная ошибка @@ -4545,7 +4545,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. @@ -4553,62 +4553,62 @@ This might take a few minutes... atomic_dex::wallet_page - + You do not have enough funds. У вас не достаточно средств. - + %1 is not activated: click on the button to enable it or enable it manually %1 не активирован: нажмите на кнопку чтобы активировать или сделайте это вручную - + You need to have %1 to pay the gas for %2 transactions. Вам нужен %1 для оплаты газа за %2 транзакции. - + Checksum verification failed for %1. Checksum верфикация неуспешна для %1. - + Invalid checksum for %1. Click the button to convert to mixed case address. - + Legacy address used for %1. Click the button to convert to a Cashaddress. - + %1 address must be prefixed with 0x %1 адрес должен начинаться с 0x - + %1 address length is invalid, please use a valid address. %1 длина адреса не валидна, пожалуйста используйте валидный адрес. - + %1 address is invalid. некорректный адрес %1. - + Invalid checksum. Неверная чек-сумма. - + %1 address has invalid prefixes. у адреса %1 неверный префикс. - + Backend error: %1 Ошибка бэкенда: %1 diff --git a/atomic_defi_design/assets/languages/atomic_defi_tr.ts b/atomic_defi_design/assets/languages/atomic_defi_tr.ts index 5dc5466106..0b7a899512 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_tr.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_tr.ts @@ -1504,67 +1504,67 @@ Bir miktar gir - + Trading Fee Takas Ücreti - + Minimum Trading Amount Minimum Takas Hacmi - + Wallet %1 already exists WALLETNAME %1 cüzdanı zaten mevcut - + %1 balance is lower than the fees amount: %2 %3 %1 bakiye ücret tutarının altında: %2 %3 - + Tradable (after fees) %1 balance is lower than minimum trade amount Takas edilebilir (ücretlerden sonra)%1 bakiyesi minimum işlem ücretinden düşük - + Please fill the price field Lütfen fiyat alanını doldurun - + Please fill the volume field - - + + Please wait for %1 to fully activate - - + + %1 volume is lower than minimum trade amount %1 hacmi, minimum işlem ücretinden düşük - - + + %1 needs to be enabled in order to use %2 - - + + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions - + Unknown Error Bilinmeyen Hata @@ -4533,7 +4533,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. @@ -4541,62 +4541,62 @@ This might take a few minutes... atomic_dex::wallet_page - + You do not have enough funds. Bakiye yetersiz. - + %1 is not activated: click on the button to enable it or enable it manually %1 etkinleştirilmedi: etkinleştirmek için düğmeye tıklayın veya manuel olarak etkinleştirin - + You need to have %1 to pay the gas for %2 transactions. %2 işlemi için gaz ödemek üzere %1'e sahip olmanız gerekir. - + Checksum verification failed for %1. %1 için sağlama toplamı doğrulaması başarısız oldu. - + Invalid checksum for %1. Click the button to convert to mixed case address. - + Legacy address used for %1. Click the button to convert to a Cashaddress. - + %1 address must be prefixed with 0x %1 adresinin önüne 0x konulmalı - + %1 address length is invalid, please use a valid address. %1 adres uzunluğu geçersiz, lütfen geçerli bir adres kullanın. - + %1 address is invalid. - + Invalid checksum. - + %1 address has invalid prefixes. - + Backend error: %1 From d7faa7d3a2b9006bf68c6b16acb90aa6a9ceaf99 Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 20:32:37 +0800 Subject: [PATCH 29/43] add wording to faq --- atomic_defi_design/Dex/Support/SupportModal.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atomic_defi_design/Dex/Support/SupportModal.qml b/atomic_defi_design/Dex/Support/SupportModal.qml index 591bf8587d..e3628d7233 100644 --- a/atomic_defi_design/Dex/Support/SupportModal.qml +++ b/atomic_defi_design/Dex/Support/SupportModal.qml @@ -113,13 +113,13 @@ Qaterial.Dialog FAQLine { title: qsTr("How long does each atomic swap take?") - text: qsTr('Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a notarization.').arg(API.app_name) + text: qsTr('Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a notarization.').arg(API.app_name) } FAQLine { title: qsTr("Do I need to be online for the duration of the swap?") - text: qsTr("Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. + text: qsTr("Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. From cbfb63b5e9ffbbbb1e3758d10fdac1cf6b4ccfed Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 20:33:23 +0800 Subject: [PATCH 30/43] add qml function for block url endpoint --- atomic_defi_design/Dex/Constants/General.qml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/atomic_defi_design/Dex/Constants/General.qml b/atomic_defi_design/Dex/Constants/General.qml index 60a60c88a3..0c784d0b98 100644 --- a/atomic_defi_design/Dex/Constants/General.qml +++ b/atomic_defi_design/Dex/Constants/General.qml @@ -476,6 +476,11 @@ QtObject { return coin_info.tx_uri } + function getBlockUri(coin_info) { + if (coin_info.block_uri == "") return "block/" + return coin_info.block_uri + } + function getTxExplorerURL(ticker, txid, add_0x=true) { if(txid !== '') { const coin_info = API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker) @@ -684,7 +689,7 @@ QtObject { if (prevent_coin_disabling.running) return false if (ticker === atomic_app_primary_coin || ticker === atomic_app_secondary_coin) return false if (ticker === "ETH") return !General.isParentCoinNeeded("ETH", "ERC-20") - if (ticker === "MATIC") return !General.isParentCoinNeeded("MATIC", "Matic") + if (ticker === "MATIC") return !General.isParentCoinNeeded("MATIC", "PLG-20") if (ticker === "FTM") return !General.isParentCoinNeeded("FTM", "FTM-20") if (ticker === "AVAX") return !General.isParentCoinNeeded("AVAX", "AVX-20") if (ticker === "BNB") return !General.isParentCoinNeeded("BNB", "BEP-20") @@ -722,7 +727,11 @@ QtObject { } function isERC20(current_ticker_infos) { - return current_ticker_infos.type === "ERC-20" || current_ticker_infos.type === "BEP-20" || current_ticker_infos.type == "Matic" + return current_ticker_infos.type === "ERC-20" + || current_ticker_infos.type === "BEP-20" + || current_ticker_infos.type == "PLG-20" + || current_ticker_infos.type == "FTM-20" + || current_ticker_infos.type == "AVX-20" } function isParentCoin(ticker) { From aaa5ce00d3f3e95293d0bd23398642c668b67a1c Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 20:33:44 +0800 Subject: [PATCH 31/43] rm QRC option for custom coins --- .../Dex/Settings/AddCustomCoinModal.qml | 70 +++++++++++++------ 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/atomic_defi_design/Dex/Settings/AddCustomCoinModal.qml b/atomic_defi_design/Dex/Settings/AddCustomCoinModal.qml index d3dd686fed..d48dffbc28 100644 --- a/atomic_defi_design/Dex/Settings/AddCustomCoinModal.qml +++ b/atomic_defi_design/Dex/Settings/AddCustomCoinModal.qml @@ -14,6 +14,9 @@ MultipageModal id: root width: 700 + horizontalPadding: 20 + verticalPadding: 20 + closePolicy: Popup.NoAutoClose onClosed: { @@ -22,7 +25,7 @@ MultipageModal } property var config_fields: ({}) - property var typeList: ["ERC-20", "QRC-20","BEP-20"] + property var typeList: ["ERC-20", "BEP-20"] // QRC removed due to unresolved issues and lack of use readonly property var custom_token_data: API.app.settings_pg.custom_token_data readonly property string general_message: qsTr('Get the contract address from') readonly property bool fetching_custom_token_data_busy: API.app.settings_pg.fetching_custom_token_data_busy @@ -67,7 +70,7 @@ MultipageModal addToConfig(input_name, "name", input_name.field.text) addToConfig(input_contract_address, "contract_address", input_contract_address.text) addToConfig(input_active, "active", input_active.checked) - addToConfig(input_coingecko_id, "coingecko_id", input_coingecko_id.field.text) + addToConfig(input_coingecko_id, "coingecko_id", input_coingecko_id.field.text) fields['coinType'] = currentType.coinType root.config_fields = General.clone(fields) @@ -86,6 +89,24 @@ MultipageModal { id: type_model + // ListElement + // { + // text: "AVX-20" + // prefix: "" + // url: "https://snowtrace.io/tokens" + // name: 'SnowTrace' + // image: "avax" + // coinType: CoinType.AVX20 + // } + ListElement + { + text: "BEP-20" + prefix: "" + url: "https://bscscan.com/tokens" + name: 'BscScan' + image: "bep" + coinType: CoinType.BEP20 + } ListElement { text: "ERC-20" @@ -95,26 +116,26 @@ MultipageModal name: 'Etherscan' coinType: CoinType.ERC20 } + // ListElement + // { + // text: "PLG-20" + // prefix: "" + // image: "matic" + // url: "https://polygonscan.com/tokens" + // name: 'Polygonscan' + // coinType: CoinType.ERC20 + // } + + // ListElement + // { + // text: "QRC-20" + // prefix: "0x" + // image: "qrc" + // url: "https://explorer.qtum.org/tokens/search" + // name: 'QTUM Insight' + // coinType: CoinType.QRC20 + // } - ListElement - { - text: "QRC-20" - prefix: "0x" - image: "qrc" - url: "https://explorer.qtum.org/tokens/search" - name: 'QTUM Insight' - coinType: CoinType.QRC20 - } - - ListElement - { - text: "BEP-20" - prefix: "" - url: "https://bscscan.com/tokens" - name: 'BscScan' - image: "bep" - coinType: CoinType.BEP20 - } } readonly property bool has_contract_address: typeList.indexOf(input_type.currentText)!==-1 @@ -125,6 +146,9 @@ MultipageModal { titleText: qsTr("Choose the asset type") height: 450 + titleTopMargin: 0 + topMarginAfterTitle: 10 + flickMax: window.height - 480 DefaultComboBox { @@ -401,13 +425,13 @@ MultipageModal // Preview MultipageModalContent { - titleText: qsTr("Preview") + titleText: qsTr("Preview Token Configuration") DefaultText { id: warning_message visible: coin_name.visible Layout.fillWidth: true - text_value: qsTr("WARNING: Application will restart immidiately to apply the changes!") + text_value: qsTr("WARNING: Application will restart immediately to apply the changes!") color: Style.colorRed horizontalAlignment: Text.AlignHCenter } From 8b1f6cadd7123b650126731411938b37dedae214 Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 20:37:36 +0800 Subject: [PATCH 32/43] coin_config -> coin_config_t --- .../atomicdex/api/coingecko/coingecko.cpp | 2 +- .../atomicdex/api/coingecko/coingecko.hpp | 4 +- .../atomicdex/api/mm2/rpc_v1/rpc.enable.cpp | 6 ++- .../atomicdex/api/mm2/rpc_v1/rpc.enable.hpp | 1 + src/core/atomicdex/events/events.hpp | 2 +- .../models/qt.global.coins.cfg.model.cpp | 19 ++++---- .../models/qt.global.coins.cfg.model.hpp | 10 ++-- .../atomicdex/services/mm2/mm2.service.cpp | 48 +++++++++++-------- .../atomicdex/services/mm2/mm2.service.hpp | 24 +++++----- .../coingecko/coingecko.wallet.charts.cpp | 2 +- .../coingecko/coingecko.wallet.charts.hpp | 2 +- .../coinpaprika/coinpaprika.provider.cpp | 6 +-- .../coinpaprika/coinpaprika.provider.hpp | 6 +-- .../atomicdex/utilities/global.utilities.cpp | 2 +- .../atomicdex/utilities/global.utilities.hpp | 2 +- src/core/atomicdex/utilities/qt.utilities.cpp | 2 +- src/core/atomicdex/utilities/qt.utilities.hpp | 2 +- src/tests/config/coins.cfg.tests.cpp | 4 +- 18 files changed, 80 insertions(+), 64 deletions(-) diff --git a/src/core/atomicdex/api/coingecko/coingecko.cpp b/src/core/atomicdex/api/coingecko/coingecko.cpp index 673a9253cb..8a6138d9fa 100644 --- a/src/core/atomicdex/api/coingecko/coingecko.cpp +++ b/src/core/atomicdex/api/coingecko/coingecko.cpp @@ -103,7 +103,7 @@ namespace atomic_dex::coingecko::api } std::pair, t_coingecko_registry> - from_enabled_coins(const std::vector& coins) + from_enabled_coins(const std::vector& coins) { std::vector out; t_coingecko_registry registry; diff --git a/src/core/atomicdex/api/coingecko/coingecko.hpp b/src/core/atomicdex/api/coingecko/coingecko.hpp index 88625c0a10..578db408ce 100644 --- a/src/core/atomicdex/api/coingecko/coingecko.hpp +++ b/src/core/atomicdex/api/coingecko/coingecko.hpp @@ -63,8 +63,8 @@ namespace atomic_dex::coingecko::api ENTT_API std::string to_coingecko_uri(market_infos_request&& request); ENTT_API std::string to_coingecko_uri(market_chart_request&& request); ENTT_API std::string to_coingecko_uri(market_chart_request_range&& request); - using t_coins_registry = std::unordered_map; - ENTT_API std::pair, t_coingecko_registry> from_enabled_coins(const std::vector& coins); + using t_coins_registry = std::unordered_map; + ENTT_API std::pair, t_coingecko_registry> from_enabled_coins(const std::vector& coins); ENTT_API pplx::task async_market_infos(market_infos_request&& request); ENTT_API pplx::task async_market_charts(market_chart_request&& request); diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp index a147bf72b8..83ee67f33e 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.cpp @@ -37,7 +37,7 @@ namespace atomic_dex::mm2 j["gas_station_url"] = cfg.gas_station_url.value(); } } - case CoinType::Matic: + case CoinType::PLG20: { if (cfg.is_testnet) { @@ -57,6 +57,10 @@ namespace atomic_dex::mm2 { j["gas_station_decimals"] = cfg.matic_gas_station_decimals.value(); } + if (cfg.mm2.has_value()) + { + j["mm2"] = cfg.mm2.value(); + } } default: j["urls"] = cfg.urls; diff --git a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp index d0b218bbbe..4f4bbafeb2 100644 --- a/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp +++ b/src/core/atomicdex/api/mm2/rpc_v1/rpc.enable.hpp @@ -35,6 +35,7 @@ namespace atomic_dex::mm2 const std::string swap_contract_address; std::optional fallback_swap_contract{std::nullopt}; std::optional matic_gas_station_decimals{9}; + std::optional mm2{1}; std::optional gas_station_url{std::nullopt}; std::optional matic_gas_station_url{std::nullopt}; std::optional testnet_matic_gas_station_url{std::nullopt}; diff --git a/src/core/atomicdex/events/events.hpp b/src/core/atomicdex/events/events.hpp index 47127603bd..8b468b8031 100644 --- a/src/core/atomicdex/events/events.hpp +++ b/src/core/atomicdex/events/events.hpp @@ -125,7 +125,7 @@ namespace atomic_dex struct coin_cfg_parsed { - std::vector cfg; + std::vector cfg; }; struct fatal_notification diff --git a/src/core/atomicdex/models/qt.global.coins.cfg.model.cpp b/src/core/atomicdex/models/qt.global.coins.cfg.model.cpp index 65ca718a44..7cdc580e28 100644 --- a/src/core/atomicdex/models/qt.global.coins.cfg.model.cpp +++ b/src/core/atomicdex/models/qt.global.coins.cfg.model.cpp @@ -26,7 +26,7 @@ namespace { QJsonObject - to_qt_binding(const atomic_dex::coin_config& coin) + to_qt_binding(const atomic_dex::coin_config_t& coin) { QJsonObject j{ {"active", coin.active}, @@ -39,7 +39,8 @@ namespace {"livecoinwatch_id", QString::fromStdString(coin.livecoinwatch_id)}, {"explorer_url", QString::fromStdString(coin.explorer_url)}, {"tx_uri", QString::fromStdString(coin.tx_uri)}, - {"address_uri", QString::fromStdString(coin.address_url)}, + {"block_uri", QString::fromStdString(coin.block_uri)}, + {"address_uri", QString::fromStdString(coin.address_uri)}, {"is_custom_coin", coin.is_custom_coin}, {"is_enabled", coin.currently_enabled}, {"has_parent_fees_ticker", coin.has_parent_fees_ticker}, @@ -86,7 +87,7 @@ namespace atomic_dex return {}; } - const coin_config& item = m_model_data.at(index.row()); + const coin_config_t& item = m_model_data.at(index.row()); switch (static_cast(role)) { case TickerRole: @@ -120,7 +121,7 @@ namespace atomic_dex bool global_coins_cfg_model::setData(const QModelIndex& index, const QVariant& value, int role) { - coin_config& item = m_model_data[index.row()]; + coin_config_t& item = m_model_data[index.row()]; switch (static_cast(role)) { case CurrentlyEnabled: @@ -192,7 +193,7 @@ namespace atomic_dex namespace atomic_dex { void - global_coins_cfg_model::initialize_model(std::vector cfg) + global_coins_cfg_model::initialize_model(std::vector cfg) { m_enabled_coins.clear(); m_all_coin_types.clear(); @@ -209,7 +210,7 @@ namespace atomic_dex m_enabled_coins[cur.ticker] = cur; } } - cfg.push_back(coin_config{.ticker = "All", .active = true, .currently_enabled = true}); + cfg.push_back(coin_config_t{.ticker = "All", .active = true, .currently_enabled = true}); SPDLOG_INFO("Initializing global coin cfg model with size {}", cfg.size()); set_checked_nb(0); beginResetModel(); @@ -377,19 +378,19 @@ namespace atomic_dex return m_all_coin_types; } - const std::vector& + const std::vector& global_coins_cfg_model::get_model_data() const { return m_model_data; } - coin_config + coin_config_t global_coins_cfg_model::get_coin_info(const std::string& ticker) const { if (const auto res = this->match(this->index(0, 0), TickerRole, QString::fromStdString(ticker), 1, Qt::MatchFlag::MatchExactly); not res.isEmpty()) { const QModelIndex& idx = res.at(0); - const coin_config& item = m_model_data.at(idx.row()); + const coin_config_t& item = m_model_data.at(idx.row()); return item; } return {}; diff --git a/src/core/atomicdex/models/qt.global.coins.cfg.model.hpp b/src/core/atomicdex/models/qt.global.coins.cfg.model.hpp index a3ae85fb2e..5d629b2540 100644 --- a/src/core/atomicdex/models/qt.global.coins.cfg.model.hpp +++ b/src/core/atomicdex/models/qt.global.coins.cfg.model.hpp @@ -39,7 +39,7 @@ namespace atomic_dex // Tells QT this class uses signal/slots mechanisms and/or has GUI elements. Q_OBJECT - using t_enabled_coins_registry = std::unordered_map; + using t_enabled_coins_registry = std::unordered_map; public: // Available Qt roles. @@ -64,7 +64,7 @@ namespace atomic_dex explicit global_coins_cfg_model(entt::registry& entity_registry, QObject* parent = nullptr); ~global_coins_cfg_model() final = default; - void initialize_model(std::vector cfg); + void initialize_model(std::vector cfg); template void update_status(const TArray& tickers, bool status); @@ -76,8 +76,8 @@ namespace atomic_dex [[nodiscard]] QHash roleNames() const final; // Getters/Setters - [[nodiscard]] const std::vector& get_model_data() const; - [[nodiscard]] coin_config get_coin_info(const std::string& ticker) const; + [[nodiscard]] const std::vector& get_model_data() const; + [[nodiscard]] coin_config_t get_coin_info(const std::string& ticker) const; [[nodiscard]] t_enabled_coins_registry get_enabled_coins() const; [[nodiscard]] global_coins_cfg_proxy_model* get_all_disabled_proxy() const; [[nodiscard]] global_coins_cfg_proxy_model* get_all_proxy() const; @@ -131,7 +131,7 @@ namespace atomic_dex void checked_nbChanged(); private: - std::vector m_model_data; // Contains all the data + std::vector m_model_data; // Contains all the data t_enabled_coins_registry m_enabled_coins; // Currently enabled_coins std::array m_proxies; diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index c71e891bf4..7ac1f50ee3 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -195,9 +195,9 @@ namespace namespace atomic_dex { - std::vector mm2_service::retrieve_coins_informations() + std::vector mm2_service::retrieve_coins_informations() { - std::vector cfg; + std::vector cfg; SPDLOG_DEBUG("retrieve_coins_informations"); check_for_reconfiguration(m_current_wallet_name); @@ -206,7 +206,7 @@ namespace atomic_dex std::string custom_tokens_filename = "custom-tokens." + m_current_wallet_name + ".json"; LOG_PATH("Retrieving Wallet information of {}", (cfg_path / filename)); - auto retrieve_cfg_functor = [](std::filesystem::path path) -> std::unordered_map + auto retrieve_cfg_functor = [](std::filesystem::path path) -> std::unordered_map { if (exists(path)) { @@ -227,7 +227,7 @@ namespace atomic_dex } } - auto res = config_json_data.get>(); + auto res = config_json_data.get>(); return res; } catch (const std::exception& error) @@ -324,11 +324,12 @@ namespace atomic_dex } activate_coins(to_enable); m_activation_queue.erase(m_activation_queue.begin(), m_activation_queue.begin() + to_enable.size()); + m_activation_clock = std::chrono::high_resolution_clock::now(); } else { - SPDLOG_DEBUG("No coins left in activation queue!"); + SPDLOG_DEBUG("Coins activation queue is empty."); + m_activation_clock = std::chrono::high_resolution_clock::now() + std::chrono::duration_cast(std::chrono::seconds(6)); } - m_activation_clock = std::chrono::high_resolution_clock::now(); } if (s_info >= 29s) @@ -442,7 +443,7 @@ namespace atomic_dex bool mm2_service::disable_coin(const std::string& ticker, std::error_code& ec) { - coin_config coin_info = get_coin_info(ticker); + coin_config_t coin_info = get_coin_info(ticker); if (not coin_info.currently_enabled) { // SPDLOG_DEBUG("[mm2_service::disable_coin]: {} not currently_enabled", ticker); @@ -498,7 +499,7 @@ namespace atomic_dex enable_coin(get_coin_info(ticker)); } - void mm2_service::enable_coin(const coin_config& coin_config) + void mm2_service::enable_coin(const coin_config_t& coin_config) { enable_coins(t_coins{coin_config}); } @@ -528,6 +529,7 @@ namespace atomic_dex std::unique_lock lock(m_activation_mutex); m_activation_queue.push_back(coin); } + m_activation_clock = std::chrono::high_resolution_clock::now() - std::chrono::duration_cast(std::chrono::seconds(13)); } void mm2_service::activate_coins(const t_coins& coins) @@ -659,7 +661,7 @@ namespace atomic_dex update_coin_status(this->m_current_wallet_name, tickers, status, m_coins_informations, m_coin_cfg_mutex); } - void mm2_service::enable_erc_family_coin(const coin_config& coin_cfg) + void mm2_service::enable_erc_family_coin(const coin_config_t& coin_cfg) { enable_erc_family_coins(t_coins{coin_cfg}); } @@ -749,6 +751,14 @@ namespace atomic_dex { request.fallback_swap_contract = coin_config.fallback_swap_contract; } + if (coin_config.is_custom_coin) + { + request.mm2 = 1; + } + else if (coin_config.wallet_only) + { + request.mm2 = 0; + } nlohmann::json j = mm2::template_request("enable"); mm2::to_json(j, request); batch_array.push_back(j); @@ -758,7 +768,7 @@ namespace atomic_dex .then([this, batch_array](pplx::task previous_task) { this->handle_exception_pplx_task(previous_task, "enable_common_coins", batch_array); }); } - void mm2_service::enable_utxo_qrc20_coin(coin_config coin_config) + void mm2_service::enable_utxo_qrc20_coin(coin_config_t coin_config) { enable_utxo_qrc20_coins(t_coins{std::move(coin_config)}); } @@ -870,7 +880,7 @@ namespace atomic_dex } - void mm2_service::enable_erc20_coin(coin_config coin_config, std::string parent_ticker) + void mm2_service::enable_erc20_coin(coin_config_t coin_config, std::string parent_ticker) { enable_erc20_coins(t_coins{std::move(coin_config)}, parent_ticker); } @@ -996,7 +1006,7 @@ namespace atomic_dex SPDLOG_DEBUG("mm2_service::enable_erc20_coins done for {}", parent_ticker); } - void mm2_service::enable_tendermint_coin(coin_config coin_config, std::string parent_ticker) + void mm2_service::enable_tendermint_coin(coin_config_t coin_config, std::string parent_ticker) { enable_tendermint_coins(t_coins{std::move(coin_config)}, parent_ticker); } @@ -1207,7 +1217,7 @@ namespace atomic_dex } } - void mm2_service::enable_slp_coin(coin_config coin_config) + void mm2_service::enable_slp_coin(coin_config_t coin_config) { enable_slp_coins(t_coins{std::move(coin_config)}); } @@ -1314,7 +1324,7 @@ namespace atomic_dex } - void mm2_service::enable_slp_testnet_coin(coin_config coin_config) + void mm2_service::enable_slp_testnet_coin(coin_config_t coin_config) { enable_slp_testnet_coins(t_coins{std::move(coin_config)}); } @@ -1662,7 +1672,7 @@ namespace atomic_dex void mm2_service::enable_zhtlc(const t_coins& coins) { - auto request_functor = [this](coin_config coin_info) -> std::pair> + auto request_functor = [this](coin_config_t coin_info) -> std::pair> { const auto& settings_system = m_system_manager.get_system(); @@ -1969,7 +1979,7 @@ namespace atomic_dex return true; } - coin_config mm2_service::get_coin_info(const std::string& ticker) const + coin_config_t mm2_service::get_coin_info(const std::string& ticker) const { std::shared_lock lock(m_coin_cfg_mutex); if (m_coins_informations.find(ticker) == m_coins_informations.cend()) @@ -2140,7 +2150,7 @@ namespace atomic_dex process_orderbook(is_a_reset); } - void mm2_service::fetch_single_balance(const coin_config& cfg_infos) + void mm2_service::fetch_single_balance(const coin_config_t& cfg_infos) { nlohmann::json batch_array = nlohmann::json::array(); if (is_pin_cfg_enabled()) @@ -2474,7 +2484,7 @@ namespace atomic_dex case CoinTypeGadget::BEP20: out = construct_url_functor("BNB", "BNBT", "bnb_tx_history", "bep_tx_history", ticker, address); break; - case CoinTypeGadget::Matic: + case CoinTypeGadget::PLG20: out = construct_url_functor("MATIC", "MATICTEST", "plg_tx_history", "plg_tx_history", ticker, address); break; case CoinTypeGadget::Moonriver: @@ -2981,7 +2991,7 @@ namespace atomic_dex mm2_service::get_electrum_server_from_token(const std::string& ticker) { std::vector servers; - const coin_config cfg = this->get_coin_info(ticker); + const coin_config_t cfg = this->get_coin_info(ticker); if (cfg.coin_type == CoinType::QRC20) { if (cfg.is_testnet.value()) diff --git a/src/core/atomicdex/services/mm2/mm2.service.hpp b/src/core/atomicdex/services/mm2/mm2.service.hpp index 59f1c323fd..afb68afe92 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.hpp +++ b/src/core/atomicdex/services/mm2/mm2.service.hpp @@ -57,8 +57,8 @@ namespace atomic_dex using t_shared_synchronized_value = boost::synchronized_value; using t_ticker = std::string; - using t_coins_registry = std::unordered_map; - using t_coins = std::vector; + using t_coins_registry = std::unordered_map; + using t_coins = std::vector; class ENTT_API mm2_service final : public ag::ecs::pre_update_system { @@ -130,13 +130,13 @@ namespace atomic_dex void process_balance_answer(const nlohmann::json& answer); void process_tx_answer(const nlohmann::json& answer_json, std::string ticker); void process_tx_tokenscan(const std::string& ticker, bool is_a_refresh); - void fetch_single_balance(const coin_config& cfg_infos); + void fetch_single_balance(const coin_config_t& cfg_infos); //! std::pair process_batch_enable_answer(const nlohmann::json& answer); [[nodiscard]] std::pair get_tx(t_mm2_ec& ec) const; std::vector get_electrum_server_from_token(const std::string& ticker); - std::vector retrieve_coins_informations(); + std::vector retrieve_coins_informations(); void handle_exception_pplx_task(pplx::task previous_task, const std::string& from, nlohmann::json batch); @@ -172,20 +172,20 @@ namespace atomic_dex void enable_coins(const std::vector& tickers); void enable_coins(const t_coins& coins); void enable_coin(const std::string& ticker); - void enable_coin(const coin_config& coin_config); + void enable_coin(const coin_config_t& coin_config); private: void update_coin_active(const std::vector& tickers, bool status); - void enable_erc_family_coin(const coin_config& coin_config); + void enable_erc_family_coin(const coin_config_t& coin_config); void enable_erc_family_coins(const t_coins& coins); - void enable_utxo_qrc20_coin(coin_config coin_config); + void enable_utxo_qrc20_coin(coin_config_t coin_config); void enable_utxo_qrc20_coins(const t_coins& coins); - void enable_slp_coin(coin_config coin_config); + void enable_slp_coin(coin_config_t coin_config); void enable_slp_coins(const t_coins& coins); - void enable_slp_testnet_coin(coin_config coin_config); + void enable_slp_testnet_coin(coin_config_t coin_config); void enable_slp_testnet_coins(const t_coins& coins); - void enable_erc20_coin(coin_config coin_config, std::string parent_ticker); + void enable_erc20_coin(coin_config_t coin_config, std::string parent_ticker); void enable_erc20_coins(const t_coins& coins, const std::string parent_ticker); - void enable_tendermint_coin(coin_config coin_config, std::string parent_ticker); + void enable_tendermint_coin(coin_config_t coin_config, std::string parent_ticker); void enable_tendermint_coins(const t_coins& coins, const std::string parent_ticker); void enable_zhtlc(const t_coins& coins); @@ -247,7 +247,7 @@ namespace atomic_dex [[nodiscard]] t_coins get_active_coins() const; //! Get Specific info about one coin - [[nodiscard]] coin_config get_coin_info(const std::string& ticker) const; + [[nodiscard]] coin_config_t get_coin_info(const std::string& ticker) const; // Tells if the given coin is enabled. [[nodiscard]] bool is_coin_enabled(const std::string& ticker) const; diff --git a/src/core/atomicdex/services/price/coingecko/coingecko.wallet.charts.cpp b/src/core/atomicdex/services/price/coingecko/coingecko.wallet.charts.cpp index ff69938303..9fa3781b99 100644 --- a/src/core/atomicdex/services/price/coingecko/coingecko.wallet.charts.cpp +++ b/src/core/atomicdex/services/price/coingecko/coingecko.wallet.charts.cpp @@ -150,7 +150,7 @@ namespace atomic_dex } void - coingecko_wallet_charts_service::fetch_data_of_single_coin(const coin_config& cfg) + coingecko_wallet_charts_service::fetch_data_of_single_coin(const coin_config_t& cfg) { using namespace std::chrono_literals; SPDLOG_INFO("fetch charts data of {} {}", cfg.ticker, cfg.coingecko_id); diff --git a/src/core/atomicdex/services/price/coingecko/coingecko.wallet.charts.hpp b/src/core/atomicdex/services/price/coingecko/coingecko.wallet.charts.hpp index ad4a929b2d..390e246240 100644 --- a/src/core/atomicdex/services/price/coingecko/coingecko.wallet.charts.hpp +++ b/src/core/atomicdex/services/price/coingecko/coingecko.wallet.charts.hpp @@ -39,7 +39,7 @@ namespace atomic_dex boost::synchronized_value m_wallet_performance; //! Private member functions - void fetch_data_of_single_coin(const coin_config& cfg); + void fetch_data_of_single_coin(const coin_config_t& cfg); void fetch_all_charts_data(); void generate_fiat_chart(); diff --git a/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.cpp b/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.cpp index f16c4a179a..9719887871 100644 --- a/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.cpp +++ b/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.cpp @@ -130,7 +130,7 @@ namespace atomic_dex { template void - coinpaprika_provider::process_provider(const coin_config& current_coin, Args... args) + coinpaprika_provider::process_provider(const coin_config_t& current_coin, Args... args) { const price_converter_request request{.base_currency_id = current_coin.coinpaprika_id, .quote_currency_id = "usd-us-dollars"}; generic_rpc_paprika_process( @@ -140,7 +140,7 @@ namespace atomic_dex template void - coinpaprika_provider::process_ticker_infos(const coin_config& current_coin, Args... args) + coinpaprika_provider::process_ticker_infos(const coin_config_t& current_coin, Args... args) { const ticker_infos_request request{.ticker_currency_id = current_coin.coinpaprika_id, .ticker_quotes = {"USD", "EUR", "BTC"}}; generic_rpc_paprika_process( @@ -150,7 +150,7 @@ namespace atomic_dex template void - coinpaprika_provider::process_ticker_historical(const coin_config& current_coin, Args... args) + coinpaprika_provider::process_ticker_historical(const coin_config_t& current_coin, Args... args) { const ticker_historical_request request{.ticker_currency_id = current_coin.coinpaprika_id, .interval = "2h"}; generic_rpc_paprika_process( diff --git a/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.hpp b/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.hpp index ab8ac6d43b..01352719e5 100644 --- a/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.hpp +++ b/src/core/atomicdex/services/price/coinpaprika/coinpaprika.provider.hpp @@ -70,11 +70,11 @@ namespace atomic_dex //! Private RPC Call template - void process_provider(const coin_config& current_coin, Args... args); + void process_provider(const coin_config_t& current_coin, Args... args); template - void process_ticker_infos(const coin_config& current_coin, Args... args); + void process_ticker_infos(const coin_config_t& current_coin, Args... args); template - void process_ticker_historical(const coin_config& current_coin, Args... args); + void process_ticker_historical(const coin_config_t& current_coin, Args... args); public: //! Deleted operation diff --git a/src/core/atomicdex/utilities/global.utilities.cpp b/src/core/atomicdex/utilities/global.utilities.cpp index bd6a0325cf..91d9550f6b 100644 --- a/src/core/atomicdex/utilities/global.utilities.cpp +++ b/src/core/atomicdex/utilities/global.utilities.cpp @@ -272,7 +272,7 @@ namespace atomic_dex::utils } std::vector - coin_cfg_to_ticker_cfg(std::vector in) + coin_cfg_to_ticker_cfg(std::vector in) { std::vector out; out.reserve(in.size()); diff --git a/src/core/atomicdex/utilities/global.utilities.hpp b/src/core/atomicdex/utilities/global.utilities.hpp index 81004e44bd..14f9753c66 100644 --- a/src/core/atomicdex/utilities/global.utilities.hpp +++ b/src/core/atomicdex/utilities/global.utilities.hpp @@ -99,6 +99,6 @@ namespace atomic_dex::utils void to_eth_checksum(std::string& address); void json_keys(nlohmann::json j); - std::vector coin_cfg_to_ticker_cfg(std::vector in); + std::vector coin_cfg_to_ticker_cfg(std::vector in); } // namespace atomic_dex::utils diff --git a/src/core/atomicdex/utilities/qt.utilities.cpp b/src/core/atomicdex/utilities/qt.utilities.cpp index 37e663833c..c9db01b27c 100644 --- a/src/core/atomicdex/utilities/qt.utilities.cpp +++ b/src/core/atomicdex/utilities/qt.utilities.cpp @@ -50,7 +50,7 @@ namespace atomic_dex QString retrieve_change_24h( - const atomic_dex::komodo_prices_provider& provider, const atomic_dex::coin_config& coin, const atomic_dex::cfg& config, + const atomic_dex::komodo_prices_provider& provider, const atomic_dex::coin_config_t& coin, const atomic_dex::cfg& config, [[maybe_unused]] const ag::ecs::system_manager& system_manager) { QString change_24h = "0"; diff --git a/src/core/atomicdex/utilities/qt.utilities.hpp b/src/core/atomicdex/utilities/qt.utilities.hpp index 75d8b0ecbd..903b5fbc24 100644 --- a/src/core/atomicdex/utilities/qt.utilities.hpp +++ b/src/core/atomicdex/utilities/qt.utilities.hpp @@ -49,7 +49,7 @@ namespace atomic_dex QJsonArray nlohmann_json_array_to_qt_json_array(const nlohmann::json& j); QJsonObject nlohmann_json_object_to_qt_json_object(const nlohmann::json& j); QString retrieve_change_24h( - const atomic_dex::komodo_prices_provider& provider, const atomic_dex::coin_config& coin, const atomic_dex::cfg& config, + const atomic_dex::komodo_prices_provider& provider, const atomic_dex::coin_config_t& coin, const atomic_dex::cfg& config, const ag::ecs::system_manager& system_manager); [[nodiscard]] QString inline sha256_qstring_from_qt_byte_array(const QByteArray& byte_array) diff --git a/src/tests/config/coins.cfg.tests.cpp b/src/tests/config/coins.cfg.tests.cpp index a968fa0af7..14f47460d0 100644 --- a/src/tests/config/coins.cfg.tests.cpp +++ b/src/tests/config/coins.cfg.tests.cpp @@ -35,8 +35,8 @@ TEST_CASE("generate all coinpaprika possibilities") std::ifstream ifs(cfg_path.string()); nlohmann::json j; ifs >> j; - std::unordered_map cfg; - auto out = j.get>(); + std::unordered_map cfg; + auto out = j.get>(); CHECK_GT(out.size(), 0); std::ofstream ofs("/tmp/out.txt", std::ios::trunc); for (auto&& [key, current_cfg]: out) From eba328e61f91d7edc6469b1e5243136a99bbead4 Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 20:38:44 +0800 Subject: [PATCH 33/43] Matic -> PLG20 --- atomic_defi_design/Dex/Constants/Style.qml | 4 ++-- src/core/atomicdex/config/coins.cfg.cpp | 20 +++++++++---------- src/core/atomicdex/config/coins.cfg.hpp | 15 ++++++++++---- .../atomicdex/constants/qt.coins.enums.hpp | 2 +- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/atomic_defi_design/Dex/Constants/Style.qml b/atomic_defi_design/Dex/Constants/Style.qml index e53a2422bf..dd10970115 100644 --- a/atomic_defi_design/Dex/Constants/Style.qml +++ b/atomic_defi_design/Dex/Constants/Style.qml @@ -203,7 +203,7 @@ QtObject { case 'QRC-20': return dark_theme ? colorCoinDark["QTUM"] : colorCoin["QTUM"] case 'KRC-20': return dark_theme ? colorCoinDark["KCS"] : colorCoin["KCS"] case 'Smart Chain': return dark_theme ? colorCoinDark["KMD"] : colorCoin["KMD"] - case 'Matic': return dark_theme ? colorCoinDark["MATIC"] : colorCoin["MATIC"] + case 'PLG-20': return dark_theme ? colorCoinDark["MATIC"] : colorCoin["MATIC"] case 'Moonriver': return dark_theme ? colorCoinDark["MOVR"] : colorCoin["MOVR"] case 'HRC-20': return dark_theme ? colorCoinDark["ONE"] : colorCoin["ONE"] case 'SmartBCH': return dark_theme ? colorCoinDark["SBCH"] : colorCoin["SBCH"] @@ -245,7 +245,7 @@ QtObject { case 'QRC-20': return dark_theme ? colorCoinDark["QTUM"] : colorCoin["QTUM"] case 'KRC-20': return dark_theme ? colorCoinDark["KCS"] : colorCoin["KCS"] case 'Smart Chain': return dark_theme ? colorCoinDark["KMD"] : colorCoin["KMD"] - case 'Matic': return dark_theme ? colorCoinDark["MATIC"] : colorCoin["MATIC"] + case 'PLG-20': return dark_theme ? colorCoinDark["MATIC"] : colorCoin["MATIC"] case 'Moonriver': return dark_theme ? colorCoinDark["MOVR"] : colorCoin["MOVR"] case 'HRC-20': return dark_theme ? colorCoinDark["ONE"] : colorCoin["ONE"] case 'SmartBCH': return dark_theme ? colorCoinDark["SBCH"] : colorCoin["SBCH"] diff --git a/src/core/atomicdex/config/coins.cfg.cpp b/src/core/atomicdex/config/coins.cfg.cpp index f634f1b837..8d22df051a 100644 --- a/src/core/atomicdex/config/coins.cfg.cpp +++ b/src/core/atomicdex/config/coins.cfg.cpp @@ -54,9 +54,9 @@ namespace { return CoinType::SLP; } - if (coin_type == "Matic") + if (coin_type == "PLG-20") { - return CoinType::Matic; + return CoinType::PLG20; } if (coin_type == "Optimism") { @@ -147,7 +147,7 @@ namespace atomic_dex } void - from_json(const nlohmann::json& j, coin_config& cfg) + from_json(const nlohmann::json& j, coin_config_t& cfg) { j.at("coin").get_to(cfg.ticker); j.at("name").get_to(cfg.name); @@ -184,10 +184,6 @@ namespace atomic_dex { cfg.merge_utxos = j.at("merge_utxos"); } - if (j.contains("mm2_backup")) - { - cfg.custom_backup = j.at("mm2_backup"); - } if (j.contains("activation_status")) { cfg.activation_status = j.at("activation_status").get(); @@ -245,9 +241,13 @@ namespace atomic_dex { j.at("explorer_tx_url").get_to(cfg.tx_uri); } + if (j.contains("explorer_block_url")) + { + j.at("explorer_block_url").get_to(cfg.block_uri); + } if (j.contains("explorer_address_url")) { - j.at("explorer_address_url").get_to(cfg.address_url); + j.at("explorer_address_url").get_to(cfg.address_uri); } // Swap contract addresses if (j.contains("swap_contract_address")) @@ -294,7 +294,7 @@ namespace atomic_dex cfg.fees_ticker = cfg.is_testnet.value() ? "BNBT" : "BNB"; cfg.is_erc_family = true; break; - case CoinType::Matic: + case CoinType::PLG20: cfg.has_parent_fees_ticker = true; cfg.fees_ticker = cfg.is_testnet.value() ? "MATICTEST" : "MATIC"; cfg.is_erc_family = true; @@ -401,7 +401,7 @@ namespace atomic_dex } void - print_coins(std::vector coins) + print_coins(std::vector coins) { std::stringstream ss; ss << "["; diff --git a/src/core/atomicdex/config/coins.cfg.hpp b/src/core/atomicdex/config/coins.cfg.hpp index 101a46a5e2..457b432e8e 100644 --- a/src/core/atomicdex/config/coins.cfg.hpp +++ b/src/core/atomicdex/config/coins.cfg.hpp @@ -30,7 +30,7 @@ namespace atomic_dex { - struct coin_config + struct coin_config_t { std::optional erc_gas_stations{std::nullopt}; std::optional matic_gas_stations{std::nullopt}; @@ -43,6 +43,7 @@ namespace atomic_dex std::string ticker; std::string gui_ticker; ///< Ticker displayed in the gui std::string name; ///< nice name + std::string fname; ///< nice name std::string parent_coin; std::string fees_ticker; std::string type; @@ -51,7 +52,8 @@ namespace atomic_dex std::string livecoinwatch_id{"test-coin"}; std::string explorer_url; std::string tx_uri{"tx/"}; - std::string address_url{"address/"}; + std::string address_uri{"address/"}; + std::string block_uri{"block/"}; std::string minimal_claim_amount{"0"}; CoinType coin_type; nlohmann::json activation_status; @@ -79,7 +81,11 @@ namespace atomic_dex std::optional gas_station_url{std::nullopt}; std::optional matic_gas_station_url{std::nullopt}; std::optional testnet_matic_gas_station_url{std::nullopt}; + std::optional contract_address{std::nullopt}; + std::optional derivation_path{std::nullopt}; + std::optional decimals{std::nullopt}; std::optional matic_gas_station_decimals{std::nullopt}; + std::optional chain_id{std::nullopt}; std::optional custom_backup; std::optional> other_types; std::optional electrum_urls; @@ -90,10 +96,11 @@ namespace atomic_dex std::optional bchd_urls; }; - void from_json(const nlohmann::json& j, coin_config& cfg); + void from_json(const nlohmann::json& j, coin_config_t& cfg); - void print_coins(std::vector coins); + void print_coins(std::vector coins); bool is_wallet_only(std::string ticker); bool is_default_coin(std::string ticker); bool is_faucet_coin(std::string ticker); + } // namespace atomic_dex \ No newline at end of file diff --git a/src/core/atomicdex/constants/qt.coins.enums.hpp b/src/core/atomicdex/constants/qt.coins.enums.hpp index a89c819a58..02832d2e16 100644 --- a/src/core/atomicdex/constants/qt.coins.enums.hpp +++ b/src/core/atomicdex/constants/qt.coins.enums.hpp @@ -37,7 +37,7 @@ namespace atomic_dex UTXO = 3, SmartChain = 4, SLP = 5, - Matic = 6, + PLG20 = 6, Optimism = 7, Arbitrum = 8, AVX20 = 9, From 6e802ac1338cc80f592a0cface52ed9de97f016a Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 20:39:01 +0800 Subject: [PATCH 34/43] fix custom coin import --- src/core/atomicdex/pages/qt.settings.page.cpp | 96 +++++++++++++------ 1 file changed, 69 insertions(+), 27 deletions(-) diff --git a/src/core/atomicdex/pages/qt.settings.page.cpp b/src/core/atomicdex/pages/qt.settings.page.cpp index aa29ac2992..91bc84f931 100644 --- a/src/core/atomicdex/pages/qt.settings.page.cpp +++ b/src/core/atomicdex/pages/qt.settings.page.cpp @@ -420,6 +420,8 @@ namespace atomic_dex return std_path_to_qstring(utils::get_runtime_coins_path()); } + // QRC20 option in add custom coin form has been disabled due to unresolved issues. + // This code remains for when we re-enable it in the future void settings_page::process_qrc_20_token_add(const QString& contract_address, const QString& coingecko_id, const QString& icon_filepath) { this->set_fetching_custom_token_data_busy(true); @@ -515,9 +517,9 @@ namespace atomic_dex { switch (coin_type) { - case CoinTypeGadget::QRC20: - return std::make_tuple( - &mm2::g_qtum_proxy_http_client, "/contract/"s + contract_address.toStdString(), "QRC20"s, "QTUM"s, "QRC-20"s, "QTUM"s, "QRC20"s); + // case CoinTypeGadget::QRC20: + // return std::make_tuple( + // &mm2::g_qtum_proxy_http_client, "/contract/"s + contract_address.toStdString(), "QRC20"s, "QTUM"s, "QRC-20"s, "QTUM"s, "QRC20"s); case CoinTypeGadget::ERC20: return std::make_tuple( &mm2::g_etherscan_proxy_http_client, "/api/v1/token_infos/erc20/"s + contract_address.toStdString(), "ERC20"s, "ETH"s, "ERC-20"s, @@ -544,24 +546,25 @@ namespace atomic_dex if (resp.status_code() == 200) { - nlohmann::json raw_parent_cfg = mm2.get_raw_mm2_ticker_cfg(parent_chain); - nlohmann::json body_json = nlohmann::json::parse(body).at("result")[0]; - const auto ticker = body_json.at("symbol").get() + "-" + type; - const auto name_lowercase = body_json.at("tokenName").get(); + nlohmann::json raw_parent_cfg = mm2.get_raw_mm2_ticker_cfg(parent_chain); + nlohmann::json body_json = nlohmann::json::parse(body).at("result")[0]; + const auto ticker = body_json.at("symbol").get() + "-" + type; + const auto name_lowercase = body_json.at("tokenName").get(); + const auto& coin_info = mm2.get_coin_info(parent_chain); + std::string token_contract_address = contract_address.toStdString(); + boost::algorithm::to_lower(token_contract_address); + utils::to_eth_checksum(token_contract_address); out["ticker"] = ticker; out["name"] = name_lowercase; copy_icon(icon_filepath, get_custom_coins_icons_path(), atomic_dex::utils::retrieve_main_ticker(ticker)); if (not is_this_ticker_present_in_raw_cfg(QString::fromStdString(ticker))) { - out["mm2_cfg"]["protocol"] = nlohmann::json::object(); - out["mm2_cfg"]["protocol"]["type"] = parent_type; - out["mm2_cfg"]["protocol"]["protocol_data"] = nlohmann::json::object(); - out["mm2_cfg"]["protocol"]["protocol_data"]["platform"] = platform; - std::string out_address = contract_address.toStdString(); - boost::algorithm::to_lower(out_address); - utils::to_eth_checksum(out_address); - out["mm2_cfg"]["protocol"]["protocol_data"]["contract_address"] = out_address; + out["mm2_cfg"]["protocol"] = nlohmann::json::object(); + out["mm2_cfg"]["protocol"]["type"] = parent_type; + out["mm2_cfg"]["protocol"]["protocol_data"] = nlohmann::json::object(); + out["mm2_cfg"]["protocol"]["protocol_data"]["platform"] = platform; + out["mm2_cfg"]["protocol"]["protocol_data"]["contract_address"] = token_contract_address; out["mm2_cfg"]["rpcport"] = raw_parent_cfg.at("rpcport"); out["mm2_cfg"]["coin"] = ticker; out["mm2_cfg"]["mm2"] = 1; @@ -577,18 +580,57 @@ namespace atomic_dex if (not is_this_ticker_present_in_normal_cfg(QString::fromStdString(ticker))) { //! - out["adex_cfg"][ticker] = nlohmann::json::object(); - out["adex_cfg"][ticker]["coin"] = ticker; - out["adex_cfg"][ticker]["name"] = name_lowercase; - out["adex_cfg"][ticker]["coingecko_id"] = coingecko_id.toStdString(); - const auto& coin_info = mm2.get_coin_info(parent_chain); - out["adex_cfg"][ticker]["nodes"] = coin_info.urls.value_or(std::vector()); - out["adex_cfg"][ticker]["explorer_url"] = coin_info.explorer_url; - out["adex_cfg"][ticker]["type"] = adex_platform; - out["adex_cfg"][ticker]["active"] = true; - out["adex_cfg"][ticker]["currently_enabled"] = false; - out["adex_cfg"][ticker]["is_custom_coin"] = true; - out["adex_cfg"][ticker]["mm2_backup"] = out["mm2_cfg"]; + out["adex_cfg"][ticker] = nlohmann::json::object(); + out["adex_cfg"][ticker]["active"] = true; + if (raw_parent_cfg.contains("chain_id")) + { + out["adex_cfg"][ticker]["chain_id"] = raw_parent_cfg.at("chain_id"); + } + out["adex_cfg"][ticker]["coin"] = ticker; + out["adex_cfg"][ticker]["coingecko_id"] = coingecko_id.toStdString(); + // contract address + if (raw_parent_cfg.contains("protocol")) + { + if (raw_parent_cfg.at("protocol").contains("protocol_data")) + { + if (raw_parent_cfg.at("protocol").at("protocol_data").contains("contract_address")) + { + out["adex_cfg"][ticker]["contract_address"] = raw_parent_cfg.at("protocol").at("protocol_data").at("contract_address"); + } + } + } + + out["adex_cfg"][ticker]["currently_enabled"] = false; + if (raw_parent_cfg.contains("decimals")) + { + out["adex_cfg"][ticker]["decimals"] = raw_parent_cfg.at("decimals"); + } + if (raw_parent_cfg.contains("derivation_path")) + { + out["adex_cfg"][ticker]["derivation_path"] = raw_parent_cfg.at("derivation_path"); + } + out["adex_cfg"][ticker]["explorer_address_url"] = coin_info.address_uri; + out["adex_cfg"][ticker]["explorer_block_url"] = coin_info.block_uri; + out["adex_cfg"][ticker]["explorer_tx_url"] = coin_info.tx_uri; + out["adex_cfg"][ticker]["explorer_url"] = coin_info.explorer_url; + out["adex_cfg"][ticker]["fallback_swap_contract"] = coin_info.swap_contract_address; + out["adex_cfg"][ticker]["fname"] = name_lowercase; + out["adex_cfg"][ticker]["is_testnet"] = true; + out["adex_cfg"][ticker]["currently_enabled"] = false; + out["adex_cfg"][ticker]["mm2"] = 1; + out["adex_cfg"][ticker]["name"] = name_lowercase; + out["adex_cfg"][ticker]["nodes"] = coin_info.urls.value_or(std::vector()); + out["adex_cfg"][ticker]["parent_coin"] = parent_chain; + out["adex_cfg"][ticker]["protocol"] = nlohmann::json::object(); + out["adex_cfg"][ticker]["protocol"]["protocol_data"] = nlohmann::json::object(); + out["adex_cfg"][ticker]["protocol"]["protocol_data"]["contract_address"] = token_contract_address; + out["adex_cfg"][ticker]["protocol"]["protocol_data"]["platform"] = platform; + out["adex_cfg"][ticker]["protocol"]["type"] = parent_type; + out["adex_cfg"][ticker]["required_confirmations"] = raw_parent_cfg.at("required_confirmations"); + out["adex_cfg"][ticker]["type"] = adex_platform; + out["adex_cfg"][ticker]["swap_contract_address"] = coin_info.swap_contract_address; + out["adex_cfg"][ticker]["wallet_only"] = false; + out["adex_cfg"][ticker]["is_custom_coin"] = true; } } else From cae8416ae4b5bbfe4dfad833bcceacbbc1f6a4a0 Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 22:16:03 +0800 Subject: [PATCH 35/43] fix CI reference error --- src/core/atomicdex/services/mm2/mm2.service.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index 7ac1f50ee3..e3cefbf725 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -521,7 +521,7 @@ namespace atomic_dex t_coins enabled_coins = get_enabled_coins(); for (const auto& coin : coins) { - if (std::ranges::any_of(enabled_coins, [&coin](const auto& enabled_coin) { return enabled_coin.ticker == coin.ticker; })) + if (ranges::any_of(enabled_coins, [&coin](const auto& enabled_coin) { return enabled_coin.ticker == coin.ticker; })) { SPDLOG_WARN("{} cannot be enabled because it already is or is being enabled.", coin.ticker); continue; From 5901b98c99d41d9d84d72810aa35eb3d68363bee Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 22:29:53 +0800 Subject: [PATCH 36/43] fix matic assignment, add links in support --- atomic_defi_design/Dex/Support/SupportModal.qml | 8 +++++++- src/core/atomicdex/config/coins.cfg.cpp | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/atomic_defi_design/Dex/Support/SupportModal.qml b/atomic_defi_design/Dex/Support/SupportModal.qml index e3628d7233..b850e3885e 100644 --- a/atomic_defi_design/Dex/Support/SupportModal.qml +++ b/atomic_defi_design/Dex/Support/SupportModal.qml @@ -110,6 +110,12 @@ Qaterial.Dialog %1 enables you to natively trade across two different blockchain networks without proxy tokens. You can also place multiple orders with the same funds. For example, you can sell 0.1 BTC for KMD, QTUM, or VRSC — the first order that fills automatically cancels all other orders.").arg(API.app_name) } + FAQLine + { + title: qsTr("Where can I see the orderbook or market statistics online?") + text: qsTr('You can view an online orderbook and market statistics at https://markets.atomicdex.io/, or use the Komodo Wallet in your browser at https://app.komodoplatform.com!') + } + FAQLine { title: qsTr("How long does each atomic swap take?") @@ -202,7 +208,7 @@ There is a toggle in settings where you can turn on/off the display of these tra Layout.preferredHeight: column_layout.height hoverEnabled: true - onClicked: Qt.openUrlExternally("https://github.com/KomodoPlatform/komodo-wallet-desktop/pull/2296") + onClicked: Qt.openUrlExternally("https://github.com/KomodoPlatform/komodo-wallet-desktop/pull/2388") ColumnLayout { diff --git a/src/core/atomicdex/config/coins.cfg.cpp b/src/core/atomicdex/config/coins.cfg.cpp index 8d22df051a..1f846b5376 100644 --- a/src/core/atomicdex/config/coins.cfg.cpp +++ b/src/core/atomicdex/config/coins.cfg.cpp @@ -58,6 +58,10 @@ namespace { return CoinType::PLG20; } + if (coin_type == "Matic") + { + return CoinType::PLG20; + } if (coin_type == "Optimism") { return CoinType::Optimism; From f74a836f5226cc78650d8ef7f199a0795e8d2a00 Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 20 Dec 2023 22:30:12 +0800 Subject: [PATCH 37/43] update ts --- .../assets/languages/atomic_defi_de.ts | 126 +++++++++--------- .../assets/languages/atomic_defi_en.ts | 112 ++++++++-------- .../assets/languages/atomic_defi_es.ts | 126 +++++++++--------- .../assets/languages/atomic_defi_fr.ts | 118 ++++++++-------- .../assets/languages/atomic_defi_ru.ts | 116 ++++++++-------- .../assets/languages/atomic_defi_tr.ts | 116 ++++++++-------- 6 files changed, 360 insertions(+), 354 deletions(-) diff --git a/atomic_defi_design/assets/languages/atomic_defi_de.ts b/atomic_defi_design/assets/languages/atomic_defi_de.ts index 809575ff29..2686cdcffb 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_de.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_de.ts @@ -58,148 +58,152 @@ AddCustomCoinModal - + Get the contract address from Erhalten Sie die Vertragsadresse von - + Choose the asset type Wählen Sie den Asset-Typ aus - + Cancel Abbrechen - - - + + + Next Weiter - + Contract address Vertragsadresse - + Enter the contract address Geben Sie die Vertragsadresse ein - + Choose the asset ticker Wählen Sie den Asset-Ticker - + Ticker Ticker - + Enter the ticker Geben Sie den Ticker ein - + Get the contract address from Erhalten Sie die Vertragsadresse von - - - - + + + + Previous Vorherige - + Choose the asset logo Wählen Sie ein Logo für das Asset aus - + Browse Durchsuchen - + Please choose the asset logo Bitte wählen Sie für das Asset ein Logo aus - + Configuration Konfiguration - + All configuration fields will be fetched using the contract address you provided. Alle Konfigurationsfelder werden mit der von Ihnen angegebenen Vertragsadresse abgerufen. - + Name Name - + Enter the name Geben Sie den Namen ein - + Coingecko ID Coingecko ID - + Enter the Coingecko ID Geben Sie die Coingecko-ID ein - + Get the Coingecko ID Coingecko-ID erhalten - + Active Aktiv - - + Preview Vorschau - - WARNING: Application will restart immidiately to apply the changes! - WARNUNG: Die Anwendung wird sofort neu gestartet, um die Änderungen zu übernehmen! + + Preview Token Configuration + + WARNING: Application will restart immediately to apply the changes! + + + + Asset not found, please go back and make sure Contract Address is correct Asset nicht gefunden, bitte gehen Sie zurück und stellen Sie sicher, dass die Vertragsadresse korrekt ist - + Config Fields Konfigurationsfelder - + Fetched Data Abgerufene Daten - + Submit & Restart Bestätigen und Neu starten @@ -1511,67 +1515,67 @@ Beispiel: Kennwort = 1234 Suffix=56 Eingabe beim Login=123456Betrag eingeben - + Trading Fee Handelsgebühr - + Minimum Trading Amount Mindesthandelsbetrag - + Wallet %1 already exists WALLETNAME Brieftasche %1 existiert bereits - + %1 balance is lower than the fees amount: %2 %3 Das %1 Guthaben ist niedriger als der Gebührenbetrag: %2 %3 - + Tradable (after fees) %1 balance is lower than minimum trade amount Handelbares %1 Guthaben (nach Gebühren) ist niedriger als der Mindesthandelsbetrag - + Please fill the price field Bitte füllen Sie das Preisfeld aus - + Please fill the volume field - - + + Please wait for %1 to fully activate - - + + %1 volume is lower than minimum trade amount %1 Volumen ist niedriger als der minimale Handelsbetrag - + %1 needs to be enabled in order to use %2 %1 muss aktiviert werden, um %2 verwenden zu können - + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions Das %1 Guthaben muss finanziert werden, ein Guthaben größer Null ist erforderlich, um das Benzin von %2 Transaktionen zu bezahlen - + Unknown Error Unbekannter Fehler @@ -3908,19 +3912,19 @@ Bitte wählen Sie eine neue Order aus. How long does each atomic swap take? Wie lange dauert ein Atomic Swap? - - - Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. - Mehrere Faktoren bestimmen die Bearbeitungszeit für einen Swap. Die Blockzeit der gehandelten Assets hängt vom jeweiligen Netzwerk ab (Bitcoin ist normalerweise das langsamste). Außerdem kann der Benutzer die Sicherheitseinstellungen anpassen. Zum Beispiel (können Sie %1 bitten, eine KMD-Transaktion nach nur 3 Bestätigungen als endgültig zu betrachten, wodurch die Tauschzeit kürzer wird als beim Warten auf eine <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">Beglaubigung </a>). - Do I need to be online for the duration of the swap? Muss ich für die Dauer des Austauschs online sein? + + + Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. + + - Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. + Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. @@ -3929,15 +3933,7 @@ If you go offline, so will your orders, and any that are in progress will fail, When you come back online, your orders will begin to broadcast again at the price you set before you went offline. If there has been significant price movement in the meantime, you might unintentionally offer someone a bargain! For this reason, we recommend cancelling orders before closing %1, or reviewing and revising your prices when restarting %1. - Ja. Sie müssen mit dem Internet verbunden bleiben und die App ausführen, um jeden Atomic Swap erfolgreich abzuschließen (sehr kurze Verbindungsunterbrechungen sind normalerweise in Ordnung). Andernfalls besteht das Risiko einer Orderstornierung, wenn Sie ein Maker sind, und das Risiko eines Geldverlusts, wenn Sie ein Taker sind. - -Das Atomic-Swap-Protokoll erfordert, dass beide Teilnehmer online bleiben und die beteiligten Blockchains überwachen, damit der Prozess atomar bleibt. - -Wenn Sie offline gehen, werden Ihre offenen und laufenden Order fehlschlagen, was zu einem potenziellen Verlust von Handels-/Transaktionsgebühren und einem Warten auf das Timeout des Swaps und die Ausstellung einer Rückerstattung führen kann. Es kann sich auch negativ auf den Reputationswert Ihrer Brieftasche für zukünftige Handelsabgleiche auswirken. - -Wenn Sie wieder online gehen, werden Ihre Order wieder zu dem Preis übertragen, den Sie festgelegt haben, bevor Sie offline gegangen sind. Wenn es in der Zwischenzeit zu erheblichen Preisbewegungen gekommen ist, könnten Sie jemandem unbeabsichtigt ein Schnäppchen anbieten! - -Aus diesem Grund empfehlen wir, Order vor dem Schließen von %1 zu stornieren oder Ihre Preise zu überprüfen und zu überarbeiten, wenn Sie %1 neu starten. + @@ -4557,7 +4553,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. diff --git a/atomic_defi_design/assets/languages/atomic_defi_en.ts b/atomic_defi_design/assets/languages/atomic_defi_en.ts index 6b26606f0c..ce47611e61 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_en.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_en.ts @@ -58,148 +58,152 @@ AddCustomCoinModal - + Get the contract address from - + Choose the asset type - + Cancel Cancel - - - + + + Next - + Contract address - + Enter the contract address - + Choose the asset ticker - + Ticker - + Enter the ticker - + Get the contract address from - - - - + + + + Previous - + Choose the asset logo - + Browse - + Please choose the asset logo - + Configuration - + All configuration fields will be fetched using the contract address you provided. - + Name - + Enter the name - + Coingecko ID - + Enter the Coingecko ID - + Get the Coingecko ID - + Active - - + Preview - - WARNING: Application will restart immidiately to apply the changes! + + Preview Token Configuration + WARNING: Application will restart immediately to apply the changes! + + + + Asset not found, please go back and make sure Contract Address is correct - + Config Fields - + Fetched Data - + Submit & Restart @@ -1510,67 +1514,67 @@ - + Trading Fee - + Minimum Trading Amount - + Wallet %1 already exists WALLETNAME - + %1 balance is lower than the fees amount: %2 %3 - + Tradable (after fees) %1 balance is lower than minimum trade amount - + Please fill the price field - + Please fill the volume field - - + + Please wait for %1 to fully activate - - + + %1 volume is lower than minimum trade amount - + %1 needs to be enabled in order to use %2 - + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions - + Unknown Error @@ -3905,18 +3909,18 @@ Please select a new order. - - Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. + + Do I need to be online for the duration of the swap? - - Do I need to be online for the duration of the swap? + + Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. - Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. + Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. @@ -4539,7 +4543,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. diff --git a/atomic_defi_design/assets/languages/atomic_defi_es.ts b/atomic_defi_design/assets/languages/atomic_defi_es.ts index ce74eb0cd6..6999f70a16 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_es.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_es.ts @@ -58,148 +58,152 @@ AddCustomCoinModal - + Get the contract address from Obtener la dirección del contrato de - + Choose the asset type Elija el tipo de activo - + Cancel Cancelar - - - + + + Next Siguiente - + Contract address Dirección del contrato - + Enter the contract address Ingrese la dirección del contrato - + Choose the asset ticker Elija el ticker del activo - + Ticker Ticker - + Enter the ticker Ingrese el ticker - + Get the contract address from Obtener la dirección del contrato de - - - - + + + + Previous Anterior - + Choose the asset logo Elija el logotipo del activo - + Browse Navegar - + Please choose the asset logo Elija el logotipo del activo - + Configuration Configuración - + All configuration fields will be fetched using the contract address you provided. Todos los campos de configuración se obtendrán usando la dirección del contrato que proporcionó. - + Name Nombre - + Enter the name Ingrese el nombre - + Coingecko ID Coingecko ID - + Enter the Coingecko ID Ingrese el Coingecko ID - + Get the Coingecko ID Obtener el Coingecko ID - + Active Activo - - + Preview Vista previa - - WARNING: Application will restart immidiately to apply the changes! - ADVERTENCIA: ¡La aplicación se reiniciará inmediatamente para aplicar los cambios! + + Preview Token Configuration + + WARNING: Application will restart immediately to apply the changes! + + + + Asset not found, please go back and make sure Contract Address is correct Activo no encontrado, regrese y asegúrese de que la dirección del contrato sea correcta - + Config Fields Campos de configuracion - + Fetched Data Datos obtenidos - + Submit & Restart Enviar & Reiniciar @@ -1510,67 +1514,67 @@ Ingrese una cantidad - + Trading Fee Tarifa de Intercambio - + Minimum Trading Amount Cantidad Mínima de Intercambio - + Wallet %1 already exists WALLETNAME Monedero %1 ya existe - + %1 balance is lower than the fees amount: %2 %3 El saldo de %1 es inferior al monto de las tarifas: %2 %3 - + Tradable (after fees) %1 balance is lower than minimum trade amount El saldo de %1 (después de las tarifas) es inferior al monto mínimo de intercambio - + Please fill the price field Por favor complete el campo de precio - + Please fill the volume field Complete el campo de volumen - - + + Please wait for %1 to fully activate Espere a que %1 se active por completo - - + + %1 volume is lower than minimum trade amount El volumen de %1 es inferior al monto mínimo de intercambio - + %1 needs to be enabled in order to use %2 %1 debe habilitarse para usar %2 - + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions se debe rellenar el saldo de %1, se requiere un saldo distinto de cero para pagar el gas de %2 transacciones - + Unknown Error Error Desconocido @@ -3910,19 +3914,19 @@ Seleccione un nuevo pedido. How long does each atomic swap take? ¿Cuánto tiempo toma cada intercambio atómico? - - - Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. - Varios factores determinan el tiempo de procesamiento de cada intercambio. El tiempo de bloqueo de los activos negociados depende de cada red (Bitcoin suele ser la más lenta). Además, el usuario puede personalizar las preferencias de seguridad. Por ejemplo, (puede pedirle a %1 que considere una transacción KMD como final después de solo 3 confirmaciones, lo que hace que el tiempo de intercambio sea más corto en comparación con esperar un <a href="https://komodoplatform.com/security-delayed- prueba de trabajo-dpow/">certificación notarial</a>. - Do I need to be online for the duration of the swap? ¿Necesito estar en línea durante la duración del intercambio? + + + Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. + + - Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. + Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. @@ -3931,15 +3935,7 @@ If you go offline, so will your orders, and any that are in progress will fail, When you come back online, your orders will begin to broadcast again at the price you set before you went offline. If there has been significant price movement in the meantime, you might unintentionally offer someone a bargain! For this reason, we recommend cancelling orders before closing %1, or reviewing and revising your prices when restarting %1. - Sí. Debe permanecer conectado a Internet y tener su aplicación ejecutándose para completar con éxito cada intercambio atómico (las interrupciones muy breves en la conectividad generalmente están bien). De lo contrario, existe el riesgo de cancelación de la operación si es un creador y el riesgo de pérdida de fondos si es un tomador. - -El protocolo de intercambio atómico requiere que ambos participantes permanezcan en línea y monitoreen las cadenas de bloques involucradas para que el proceso permanezca atómico. - -Si se desconecta, también lo harán sus pedidos, y cualquiera que esté en curso fallará, lo que provocará una posible pérdida de tarifas comerciales / de transacción, y una espera para que el intercambio se agote y emita un reembolso. También puede afectar negativamente el puntaje de reputación de su billetera para futuras coincidencias comerciales. - -Cuando vuelva a estar en línea, sus pedidos comenzarán a transmitirse nuevamente al precio que estableció antes de desconectarse. Si ha habido un movimiento de precios significativo en el ínterin, ¡es posible que involuntariamente le ofrezcas a alguien una ganga! - -Por este motivo, recomendamos cancelar los pedidos antes de cerrar %1 o revisar y revisar sus precios al reiniciar %1. + @@ -4560,7 +4556,7 @@ Esto puede tardar unos minutos... atomic_dex::settings_page - + An error has occurred. Se ha producido un error. diff --git a/atomic_defi_design/assets/languages/atomic_defi_fr.ts b/atomic_defi_design/assets/languages/atomic_defi_fr.ts index 843f2bf1f8..6322084b96 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_fr.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_fr.ts @@ -58,148 +58,152 @@ AddCustomCoinModal - + Choose the asset type Choisir le type d'actif - + Cancel Annuler - - - + + + Next Suivant - + Enter the contract address Entrer l'adresse du contrat - + Choose the asset ticker Choisissez le symbole de l'actif - + Ticker Symbole - + Enter the ticker Entrez le symbole - + Get the contract address from Obtenez l'adresse du contrat de - + Contract address - + Get the contract address from Obtenez l'adresse du contrat de - - - - + + + + Previous Précedent - + Choose the asset logo Choisissez le logo de l'actif - + Browse Naviguer - + Please choose the asset logo S'il-vous-plaît choissisez le logo de l'actif - + Configuration Configuration - + All configuration fields will be fetched using the contract address you provided. Tous les champs de configuration vont être récupérés à partir de l'adresse du contrat que vous avez fournis. - + Name Nom - + Enter the name Entrez le nom - + Coingecko ID Coingecko ID - + Enter the Coingecko ID Entrer l'identifiant coingecko - + Get the Coingecko ID Récupérer l'identifiant coingecko - + Active Actif - - + Preview Pré-visualisation - - WARNING: Application will restart immidiately to apply the changes! - AVERTISSEMENT: l'application redémarrera immédiatement pour appliquer les modifications! + + Preview Token Configuration + + WARNING: Application will restart immediately to apply the changes! + + + + Asset not found, please go back and make sure Contract Address is correct Actif introuvable, veuillez revenir en arrière et vous assurer que l'adresse du contrat est correcte - + Config Fields Champs de configuration - + Fetched Data Données récupérées - + Submit & Restart Soumettre et redémarrer @@ -1510,67 +1514,67 @@ Entrez un montant - + Trading Fee Frais d'échanges - + Minimum Trading Amount Frais d'échange minimum - + Wallet %1 already exists WALLETNAME Le portefeuille %1 existe déjà - + %1 balance is lower than the fees amount: %2 %3 La %1 balance est inférieur aux frais: %2 %3 - + Tradable (after fees) %1 balance is lower than minimum trade amount Le solde négociable (après frais) %1 est inférieur au montant minimum de la transaction - + Please fill the price field Veuillez remplir le champ de prix - + Please fill the volume field - - + + Please wait for %1 to fully activate - - + + %1 volume is lower than minimum trade amount Le volume de %1 est inférieur au montant minimum de la transaction - + %1 needs to be enabled in order to use %2 %1 doit être activé pour utiliser %2 - + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions Le solde %1 doit être financé, un solde différent de zéro est requis pour payer les frais de transactions de %2 - + Unknown Error Erreur inconnue @@ -3904,21 +3908,19 @@ Please select a new order. How long does each atomic swap take? Combien de temps dure chaque échange atomique ? - - - Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. - Les autres DEX ne vous permettent généralement d'échanger que des actifs basés sur un seul réseau de blockchain, d'utiliser des jetons proxy et de ne passer qu'une seule commande avec les mêmes fonds. - -Plusieurs facteurs déterminent le temps de traitement de chaque swap. Le temps de blocage des actifs échangés dépend de chaque réseau (Bitcoin étant généralement le plus lent). De plus, l'utilisateur peut personnaliser ses préférences de sécurité. Par exemple, (vous pouvez demander à %1 de considérer une transaction KMD comme finale après seulement 3 confirmations, ce qui raccourcit le temps d'échange par rapport à l'attente d'une <a href="https://komodoplatform.com/security-delayed-proof- of-work-dpow/">notarisation</a>. - Do I need to be online for the duration of the swap? Dois-je être en ligne pendant toute la durée du swap ? + + + Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. + + - Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. + Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. @@ -4541,7 +4543,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. diff --git a/atomic_defi_design/assets/languages/atomic_defi_ru.ts b/atomic_defi_design/assets/languages/atomic_defi_ru.ts index 57032eaf03..b45eb47eba 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_ru.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_ru.ts @@ -58,148 +58,152 @@ AddCustomCoinModal - + Choose the asset type Выберите тип монеты - + Cancel Отменить - - - + + + Next Далее - + Enter the contract address Введите адрес контракта - + Choose the asset ticker Введите тикер монеты - + Ticker Тикер - + Enter the ticker Введите тикер - + Get the contract address from Получить адрес контракта от - + Contract address - + Get the contract address from Получить адрес контракта от - - - - + + + + Previous Назад - + Choose the asset logo Загрузите логотип монеты - + Browse Выбрать - + Please choose the asset logo Выберите логотип монеты - + Configuration Конфигурация - + All configuration fields will be fetched using the contract address you provided. Все параметры конфигурации будут получены с помощью адреса контракта. - + Name Название - + Enter the name Введите название - + Coingecko ID Coingecko ID - + Enter the Coingecko ID Введите Coingecko ID - + Get the Coingecko ID Получить Coingecko ID - + Active Активно - - + Preview Превью - - WARNING: Application will restart immidiately to apply the changes! - ПРЕДУПРЕЖДЕНИЕ: Приложение будет немедленно перезапущено для применения изменений! + + Preview Token Configuration + + WARNING: Application will restart immediately to apply the changes! + + + + Asset not found, please go back and make sure Contract Address is correct Токен не найден, убедитесь, что адрес контракта указан верно - + Config Fields Параметры конфигурации - + Fetched Data Полученные данные - + Submit & Restart Отправить и перезапустить @@ -1516,67 +1520,67 @@ Введите количество - + Trading Fee Торговая комиссия - + Minimum Trading Amount Минимальный объем сделки - + Wallet %1 already exists WALLETNAME Кошелек %1 уже существует - + %1 balance is lower than the fees amount: %2 %3 %1 баланс менее чем размер комиссий: %2 %3 - + Tradable (after fees) %1 balance is lower than minimum trade amount Торгуемый (после комиссий) баланс %1 - меньше минимальной суммы сделки - + Please fill the price field Пожалуйста, укажите цену - + Please fill the volume field - - + + Please wait for %1 to fully activate - - + + %1 volume is lower than minimum trade amount Сумма %1 меньше минимальной суммы сделки - + %1 needs to be enabled in order to use %2 %1 должен быть активным для использования %2 - + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions нужно пополнить баланс %1 для оплаты газа %2 транзакций - + Unknown Error Неизвестная ошибка @@ -3910,19 +3914,19 @@ Please select a new order. How long does each atomic swap take? Сколько времени занимает каждый атомарный своп? - - - Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. - Несколько факторов определяют время завершения каждого Атомарного Свопа. Время блока на каждой из торгуемых сетей (Bitcoin обычно самый медленный) В добавок каждый юзер может кастомизировать опции защиты. Например в пред-настройках Свопа, (вы можете установить %1 так чтобы протокол считал транзакцию KMD финальной как только она получит всего 3 подтверждения что уменьшает время Атомарного Свопа в сравнении с ожиданием <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">нотаризации</a>. - Do I need to be online for the duration of the swap? Необходимо ли мне быть в сети во время свопа? + + + Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. + + - Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. + Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. @@ -4545,7 +4549,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. diff --git a/atomic_defi_design/assets/languages/atomic_defi_tr.ts b/atomic_defi_design/assets/languages/atomic_defi_tr.ts index 0b7a899512..ad83b47c82 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_tr.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_tr.ts @@ -58,148 +58,152 @@ AddCustomCoinModal - + Choose the asset type Varlık türünü seçin - + Cancel İptal - - - + + + Next İleri - + Enter the contract address Kontrat adresini girin - + Choose the asset ticker Varlık kodunu girin - + Ticker Varlık Kodu - + Enter the ticker Varlık kodunu girin - + Get the contract address from Kontrat adresini şuradan alın - + Contract address - + Get the contract address from Kontrat adresini şuradan alın - - - - + + + + Previous Geri - + Choose the asset logo Varlık logosunu seçin - + Browse Göz at - + Please choose the asset logo Lütfen varlık logosunu seçin - + Configuration Konfigürasyon - + All configuration fields will be fetched using the contract address you provided. Tüm konfigürasyon bilgileri verdiğiniz kontrat adresinden edinilip doldurulacak. - + Name İsim - + Enter the name İsmi girin - + Coingecko ID Coingecko ID - + Enter the Coingecko ID Coingecko ID'sini girin - + Get the Coingecko ID Coingecko ID'si al - + Active Aktif - - + Preview Görüntüle - - WARNING: Application will restart immidiately to apply the changes! - DİKKAT: Program değişiklikleri uygulamak için yeniden başlatılacak! + + Preview Token Configuration + + WARNING: Application will restart immediately to apply the changes! + + + + Asset not found, please go back and make sure Contract Address is correct Varlık bulunamadı, lütfen geri dönün ve Kontrat Adresi'nin doğruluğundan emin olun - + Config Fields Konfig Alanları - + Fetched Data Çekilen Veri - + Submit & Restart Yolla ve Yeniden Başlat @@ -1504,67 +1508,67 @@ Bir miktar gir - + Trading Fee Takas Ücreti - + Minimum Trading Amount Minimum Takas Hacmi - + Wallet %1 already exists WALLETNAME %1 cüzdanı zaten mevcut - + %1 balance is lower than the fees amount: %2 %3 %1 bakiye ücret tutarının altında: %2 %3 - + Tradable (after fees) %1 balance is lower than minimum trade amount Takas edilebilir (ücretlerden sonra)%1 bakiyesi minimum işlem ücretinden düşük - + Please fill the price field Lütfen fiyat alanını doldurun - + Please fill the volume field - - + + Please wait for %1 to fully activate - - + + %1 volume is lower than minimum trade amount %1 hacmi, minimum işlem ücretinden düşük - + %1 needs to be enabled in order to use %2 - + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions - + Unknown Error Bilinmeyen Hata @@ -3898,19 +3902,19 @@ Please select a new order. How long does each atomic swap take? Her bir atomik takas ne kadar sürer? - - - Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. - Her takas için işlem süresini birkaç faktör belirler. İşlem gören varlıkların blok süresi her bir ağa bağlıdır (Bitcoin tipik olarak en yavaş olanıdır) Ek olarak, kullanıcı güvenlik tercihlerini özelleştirebilir. (Örneğin; %1 in KMD işlemini sadece 3 onayla gerçekleştirmesini seçerek takas süresini <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarizasyon</a> süresinden daha öncesine kısaltabilirsiniz. - Do I need to be online for the duration of the swap? Takas süresi boyunca çevrimiçi olmam gerekir mi? + + + Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. + + - Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. + Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. @@ -4533,7 +4537,7 @@ This might take a few minutes... atomic_dex::settings_page - + An error has occurred. From dbd7eb15cf650b4249ffc2b475df21d07ecf3b3a Mon Sep 17 00:00:00 2001 From: smk762 Date: Thu, 21 Dec 2023 01:55:50 +0800 Subject: [PATCH 38/43] fix false positive for already init coins --- src/core/atomicdex/services/mm2/mm2.service.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index e3cefbf725..31abda32cf 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -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(coins[idx].ticker, error); SPDLOG_ERROR(error); From 63da539d0e54641bf88dd904751f8676dfd8a896 Mon Sep 17 00:00:00 2001 From: smk762 Date: Thu, 21 Dec 2023 04:38:16 +0800 Subject: [PATCH 39/43] fix type loading --- atomic_defi_design/Dex/Constants/Style.qml | 2 ++ src/core/atomicdex/services/mm2/mm2.service.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/atomic_defi_design/Dex/Constants/Style.qml b/atomic_defi_design/Dex/Constants/Style.qml index dd10970115..b94d057492 100644 --- a/atomic_defi_design/Dex/Constants/Style.qml +++ b/atomic_defi_design/Dex/Constants/Style.qml @@ -203,6 +203,7 @@ QtObject { case 'QRC-20': return dark_theme ? colorCoinDark["QTUM"] : colorCoin["QTUM"] case 'KRC-20': return dark_theme ? colorCoinDark["KCS"] : colorCoin["KCS"] case 'Smart Chain': return dark_theme ? colorCoinDark["KMD"] : colorCoin["KMD"] + case 'Matic': case 'PLG-20': return dark_theme ? colorCoinDark["MATIC"] : colorCoin["MATIC"] case 'Moonriver': return dark_theme ? colorCoinDark["MOVR"] : colorCoin["MOVR"] case 'HRC-20': return dark_theme ? colorCoinDark["ONE"] : colorCoin["ONE"] @@ -245,6 +246,7 @@ QtObject { case 'QRC-20': return dark_theme ? colorCoinDark["QTUM"] : colorCoin["QTUM"] case 'KRC-20': return dark_theme ? colorCoinDark["KCS"] : colorCoin["KCS"] case 'Smart Chain': return dark_theme ? colorCoinDark["KMD"] : colorCoin["KMD"] + case 'Matic': case 'PLG-20': return dark_theme ? colorCoinDark["MATIC"] : colorCoin["MATIC"] case 'Moonriver': return dark_theme ? colorCoinDark["MOVR"] : colorCoin["MOVR"] case 'HRC-20': return dark_theme ? colorCoinDark["ONE"] : colorCoin["ONE"] diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index 31abda32cf..e8e4e03fed 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -611,13 +611,13 @@ namespace atomic_dex { SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} BEP20 coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", bep20_coins.size()); // enable_erc20_coins(bep20_coins, "BNB"); - enable_erc_family_coins(erc_family_coins); + enable_erc_family_coins(bep20_coins); } if (bep20_testnet_coins.size() > 0) { SPDLOG_INFO(">>>>>>>>>>>>>>>>>>>>>>>>>>> Enabling {} bep20_testnet_coins <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<", bep20_testnet_coins.size()); // enable_erc20_coins(bep20_testnet_coins, "BNBT"); - enable_erc_family_coins(erc_family_coins); + enable_erc_family_coins(bep20_testnet_coins); } if (erc_family_coins.size() > 0) { From 5f844802a4180204ceeb1bf11662c98e1a6a6c45 Mon Sep 17 00:00:00 2001 From: smk762 Date: Thu, 21 Dec 2023 22:31:32 +0800 Subject: [PATCH 40/43] hide option for standard coins --- atomic_defi_design/Dex/Components/CoinMenu.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/atomic_defi_design/Dex/Components/CoinMenu.qml b/atomic_defi_design/Dex/Components/CoinMenu.qml index 73227c6835..2cb43025b7 100644 --- a/atomic_defi_design/Dex/Components/CoinMenu.qml +++ b/atomic_defi_design/Dex/Components/CoinMenu.qml @@ -27,6 +27,7 @@ Menu { MenuItem { id: disable_action + height: 40 text: qsTr("Disable %1", "TICKER").arg(ticker) onTriggered: API.app.disable_coins([ticker]) enabled: can_disable @@ -41,15 +42,19 @@ Menu { restart_modal.open() } enabled: disable_action.enabled && API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker).is_custom_coin + visible: enabled + height: enabled ? 40 : 0 } MenuItem { + height: 40 enabled: !General.prevent_coin_disabling.running text: qsTr("Disable all %1 assets").arg(type) onTriggered: API.app.disable_coins(API.app.portfolio_pg.get_all_coins_by_type(type)) } MenuItem { + height: 40 enabled: !General.prevent_coin_disabling.running text: qsTr("Disable all assets") onTriggered: API.app.disable_coins(API.app.portfolio_pg.get_all_enabled_coins()) @@ -57,6 +62,7 @@ Menu { MenuItem { + height: 40 enabled: !General.prevent_coin_disabling.running text: qsTr("Disable 0 balance assets") onTriggered: API.app.disable_no_balance_coins() From c7dff8d7336a70c05df5b2843de809969f2980cd Mon Sep 17 00:00:00 2001 From: smk762 Date: Thu, 21 Dec 2023 22:34:04 +0800 Subject: [PATCH 41/43] update var names --- .../ProView/PlaceOrderForm/OrderForm.qml | 3 +- .../Dex/Exchange/Trade/SimpleView/Trade.qml | 2 +- atomic_defi_design/Dex/Wallet/SendModal.qml | 8 ++--- src/app/app.cpp | 4 +-- src/app/app.hpp | 2 +- src/core/atomicdex/api/mm2/mm2.client.cpp | 6 +--- .../atomicdex/models/qt.portfolio.model.cpp | 33 +++++++++++++++++-- src/core/atomicdex/pages/qt.wallet.page.cpp | 12 +++---- .../atomicdex/services/mm2/mm2.service.hpp | 4 +-- .../coingecko/coingecko.wallet.charts.cpp | 2 +- .../services/price/global.provider.cpp | 4 +-- 11 files changed, 51 insertions(+), 29 deletions(-) diff --git a/atomic_defi_design/Dex/Exchange/ProView/PlaceOrderForm/OrderForm.qml b/atomic_defi_design/Dex/Exchange/ProView/PlaceOrderForm/OrderForm.qml index 2353eb1395..3e508ca18c 100644 --- a/atomic_defi_design/Dex/Exchange/ProView/PlaceOrderForm/OrderForm.qml +++ b/atomic_defi_design/Dex/Exchange/ProView/PlaceOrderForm/OrderForm.qml @@ -26,8 +26,7 @@ ColumnLayout function getMaxBalance() { if (General.isFilled(base_ticker)) - return API.app.get_balance(base_ticker) - + return API.app.get_balance_info_qstr(base_ticker) return "0" } diff --git a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml index 0665bba275..6a92ed7e0e 100644 --- a/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml +++ b/atomic_defi_design/Dex/Exchange/Trade/SimpleView/Trade.qml @@ -22,7 +22,7 @@ ClipRRect // Trade Card readonly property var fees: Constants.API.app.trading_pg.fees readonly property var max_trade_volume: Constants.API.app.trading_pg.max_volume readonly property var min_trade_volume: Constants.API.app.trading_pg.min_trade_vol - readonly property var sell_ticker_balance: parseFloat(API.app.get_balance(left_ticker)) + readonly property var sell_ticker_balance: parseFloat(API.app.get_balance_info_qstr(left_ticker)) readonly property bool coin_tradable: selectedTicker !== "" && sell_ticker_balance > 0 readonly property bool waiting_for_sell_coin_info: (max_trade_volume == 0 || !Constants.General.isZhtlcReady(left_ticker)) && sell_ticker_balance != 0 diff --git a/atomic_defi_design/Dex/Wallet/SendModal.qml b/atomic_defi_design/Dex/Wallet/SendModal.qml index 607459b78a..2fcd8effc9 100644 --- a/atomic_defi_design/Dex/Wallet/SendModal.qml +++ b/atomic_defi_design/Dex/Wallet/SendModal.qml @@ -414,11 +414,11 @@ MultipageModal { if (_preparePage.cryptoSendMode) { - input_amount.text = API.app.get_balance(api_wallet_page.ticker); + input_amount.text = API.app.get_balance_info_qstr(api_wallet_page.ticker); } else { - let cryptoBalance = new BigNumber(API.app.get_balance(api_wallet_page.ticker)); + let cryptoBalance = new BigNumber(API.app.get_balance_info_qstr(api_wallet_page.ticker)); input_amount.text = cryptoBalance.multipliedBy(current_ticker_infos.current_currency_ticker_price).toFixed(8); } } @@ -706,7 +706,7 @@ MultipageModal wrapMode: Label.Wrap color: Style.colorRed text_value: qsTr("Custom Fee can't be higher than the amount") + "\n" - + qsTr("You have %1", "AMT TICKER").arg(General.formatCrypto("", API.app.get_balance(General.getFeesTicker(current_ticker_infos)), General.getFeesTicker(current_ticker_infos))) + + qsTr("You have %1", "AMT TICKER").arg(General.formatCrypto("", API.app.get_balance_info_qstr(General.getFeesTicker(current_ticker_infos)), General.getFeesTicker(current_ticker_infos))) } } @@ -722,7 +722,7 @@ MultipageModal color: Dex.CurrentTheme.warningColor text_value: qsTr("Not enough funds.") + "\n" - + qsTr("You have %1", "AMT TICKER").arg(General.formatCrypto("", API.app.get_balance(api_wallet_page.ticker), api_wallet_page.ticker)) + + qsTr("You have %1", "AMT TICKER").arg(General.formatCrypto("", API.app.get_balance_info_qstr(api_wallet_page.ticker), api_wallet_page.ticker)) } DefaultBusyIndicator { diff --git a/src/app/app.cpp b/src/app/app.cpp index 8f7df9c613..54cfc55fb4 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -560,11 +560,11 @@ namespace atomic_dex return res; } - QString application::get_balance(const QString& coin) + QString application::get_balance_info_qstr(const QString& coin) { std::error_code ec; SPDLOG_DEBUG("{} l{}", __FUNCTION__, __LINE__); - auto res = get_mm2().my_balance(coin.toStdString(), ec); + auto res = get_mm2().get_balance_info(coin.toStdString(), ec); return QString::fromStdString(res); } diff --git a/src/app/app.hpp b/src/app/app.hpp index 69d6f095cb..6ad76aafc7 100644 --- a/src/app/app.hpp +++ b/src/app/app.hpp @@ -160,7 +160,7 @@ namespace atomic_dex Q_INVOKABLE bool disconnect(); Q_INVOKABLE bool enable_coins(const QStringList& coins); Q_INVOKABLE bool enable_coin(const QString& coin); - Q_INVOKABLE QString get_balance(const QString& coin); + Q_INVOKABLE QString get_balance_info_qstr(const QString& coin); Q_INVOKABLE QJsonObject get_zhtlc_status(const QString& coin); Q_INVOKABLE [[nodiscard]] bool do_i_have_enough_funds(const QString& ticker, const QString& amount) const; Q_INVOKABLE bool disable_coins(const QStringList& coins); diff --git a/src/core/atomicdex/api/mm2/mm2.client.cpp b/src/core/atomicdex/api/mm2/mm2.client.cpp index 1ebd7f2c7b..151066275d 100644 --- a/src/core/atomicdex/api/mm2/mm2.client.cpp +++ b/src/core/atomicdex/api/mm2/mm2.client.cpp @@ -82,11 +82,7 @@ namespace { SPDLOG_DEBUG("redacted rpc answer: {}", body.substr(0, 1000)); } - else - { - SPDLOG_DEBUG("rpc answer: {}", body); - } - SPDLOG_DEBUG("rpc answer: {}", body); + SPDLOG_DEBUG("body: {}", body); nlohmann::json json_answer; Rpc rpc; try diff --git a/src/core/atomicdex/models/qt.portfolio.model.cpp b/src/core/atomicdex/models/qt.portfolio.model.cpp index 9b320fb3f0..55b6557f2f 100644 --- a/src/core/atomicdex/models/qt.portfolio.model.cpp +++ b/src/core/atomicdex/models/qt.portfolio.model.cpp @@ -71,7 +71,7 @@ namespace atomic_dex auto coin = mm2_system.get_coin_info(ticker); SPDLOG_INFO("Building portfolio for ticker {}", coin.ticker); std::error_code ec; - std::string balance = mm2_system.my_balance(coin.ticker, ec); + std::string balance = mm2_system.get_balance_info(coin.ticker, ec); SPDLOG_INFO("balance for ticker {}: {}", coin.ticker, balance); const QString change_24h = retrieve_change_24h(provider, coin, *m_config, m_system_manager); portfolio_data data{ @@ -106,6 +106,33 @@ namespace atomic_dex } } + bool + portfolio_model::update_activation_status() + { + const auto& mm2_system = this->m_system_manager.get_system(); + const auto coins = this->m_system_manager.get_system().get_global_cfg()->get_enabled_coins(); + + for (auto&& [_, coin]: coins) + { + if (m_ticker_registry.find(coin.ticker) == m_ticker_registry.end()) + { + SPDLOG_WARN("[update_activation_status] ticker: {} not inserted yet in the model, skipping", coin.ticker); + return false; + } + const std::string& ticker = coin.ticker; + if (const auto res = this->match(this->index(0, 0), TickerRole, QString::fromStdString(ticker), 1, Qt::MatchFlag::MatchExactly); + not res.isEmpty()) + { + std::error_code ec; + const QModelIndex& idx = res.at(0); + auto coin_info = mm2_system.get_coin_info(ticker); + QJsonObject status = nlohmann_json_object_to_qt_json_object(coin_info.activation_status); + update_value(ActivationStatus, status, idx, *this); + SPDLOG_DEBUG("updated activation status of: {}", ticker); + } + } + } + bool portfolio_model::update_currency_values() { @@ -142,7 +169,7 @@ namespace atomic_dex update_value(LastPriceTimestamp, last_price_timestamp, idx, *this); QString change24_h = retrieve_change_24h(provider, coin, *m_config, m_system_manager); update_value(Change24H, change24_h, idx, *this); - const QString balance = QString::fromStdString(mm2_system.my_balance(coin.ticker, ec)); + const QString balance = QString::fromStdString(mm2_system.get_balance_info(coin.ticker, ec)); auto&& [prev_balance, new_balance, is_change_b] = update_value(BalanceRole, balance, idx, *this); const QString display = QString::fromStdString(coin.ticker) + " (" + balance + ")"; update_value(Display, display, idx, *this); @@ -191,7 +218,7 @@ namespace atomic_dex const std::string& currency = m_config->current_currency; const std::string& fiat = m_config->current_fiat; const QModelIndex& idx = res.at(0); - const QString balance = QString::fromStdString(mm2_system.my_balance(ticker, ec)); + const QString balance = QString::fromStdString(mm2_system.get_balance_info(ticker, ec)); auto&& [prev_balance, new_balance, is_change_b] = update_value(BalanceRole, balance, idx, *this); const QString main_currency_balance_value = QString::fromStdString(price_service.get_price_in_fiat(currency, ticker, ec)); auto&& [_1, _2, is_change_mc] = update_value(MainCurrencyBalanceRole, main_currency_balance_value, idx, *this); diff --git a/src/core/atomicdex/pages/qt.wallet.page.cpp b/src/core/atomicdex/pages/qt.wallet.page.cpp index fc78130154..7613bc8dc2 100644 --- a/src/core/atomicdex/pages/qt.wallet.page.cpp +++ b/src/core/atomicdex/pages/qt.wallet.page.cpp @@ -67,7 +67,7 @@ namespace atomic_dex m_send_available = true; m_send_availability_state = ""; m_current_ticker_fees_coin_enabled = true; - if (not mm2.get_balance(ticker_info.ticker) > 0) + if (not mm2.get_balance_info_f(ticker_info.ticker) > 0) { m_send_available = false; m_send_availability_state = tr("You do not have enough funds."); @@ -84,7 +84,7 @@ namespace atomic_dex tr("%1 is not activated: click on the button to enable it or enable it manually").arg(QString::fromStdString(parent_ticker_info.ticker)); m_current_ticker_fees_coin_enabled = false; } - else if (not mm2.get_balance(parent_ticker_info.ticker) > 0) + else if (not mm2.get_balance_info_f(parent_ticker_info.ticker) > 0) { m_send_available = false; m_send_availability_state = tr("You need to have %1 to pay the gas for %2 transactions.") @@ -275,14 +275,14 @@ namespace atomic_dex auto& mm2_system = m_system_manager.get_system(); if (mm2_system.is_mm2_running()) { - SPDLOG_DEBUG("get_ticker_infos for {} wallet page", mm2_system.get_current_ticker()); + // SPDLOG_DEBUG("get_ticker_infos for {} wallet page", mm2_system.get_current_ticker()); auto& price_service = m_system_manager.get_system(); const auto& settings_system = m_system_manager.get_system(); const auto& provider = m_system_manager.get_system(); const auto& ticker = mm2_system.get_current_ticker(); const auto& coin_info = mm2_system.get_coin_info(ticker); const auto& config = settings_system.get_cfg(); - obj["balance"] = QString::fromStdString(mm2_system.my_balance(ticker, ec)); + obj["balance"] = QString::fromStdString(mm2_system.get_balance_info(ticker, ec)); obj["name"] = QString::fromStdString(coin_info.name); obj["type"] = QString::fromStdString(coin_info.type); obj["segwit_supported"] = coin_info.segwit; @@ -538,7 +538,7 @@ namespace atomic_dex if (max) { std::error_code ec; - amount_std = mm2_system.my_balance(ticker, ec); + amount_std = mm2_system.get_balance_info(ticker, ec); } auto answer_functor = [this, coin_info, ticker, amount_std](web::http::http_response resp) @@ -740,7 +740,7 @@ namespace atomic_dex if (max) { std::error_code ec; - amount_std = mm2_system.my_balance(ticker, ec); + amount_std = mm2_system.get_balance_info(ticker, ec); } //! Answer diff --git a/src/core/atomicdex/services/mm2/mm2.service.hpp b/src/core/atomicdex/services/mm2/mm2.service.hpp index afb68afe92..4e60c79ffa 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.hpp +++ b/src/core/atomicdex/services/mm2/mm2.service.hpp @@ -227,7 +227,7 @@ namespace atomic_dex [[nodiscard]] const std::atomic_bool& is_mm2_running() const; //! Retrieve my balance for a given ticker as a string. - [[nodiscard]] std::string my_balance(const std::string& ticker, t_mm2_ec& ec) const; + [[nodiscard]] std::string get_balance_info(const std::string& ticker, t_mm2_ec& ec) const; //! Refresh the current orderbook (internally call process_orderbook) void fetch_current_orderbook_thread(bool is_a_reset = false); @@ -262,7 +262,7 @@ namespace atomic_dex [[nodiscard]] orders_and_swaps get_orders_and_swaps() const; //! Get balance with locked funds for a given ticker as a boost::multiprecision::cpp_dec_float_50. - [[nodiscard]] t_float_50 get_balance(const std::string& ticker) const; + [[nodiscard]] t_float_50 get_balance_info_f(const std::string& ticker) const; //! Return true if we the balance of the `ticker` > amount, false otherwise. [[nodiscard]] bool do_i_have_enough_funds(const std::string& ticker, const t_float_50& amount) const; diff --git a/src/core/atomicdex/services/price/coingecko/coingecko.wallet.charts.cpp b/src/core/atomicdex/services/price/coingecko/coingecko.wallet.charts.cpp index 9fa3781b99..65ffbcbfe8 100644 --- a/src/core/atomicdex/services/price/coingecko/coingecko.wallet.charts.cpp +++ b/src/core/atomicdex/services/price/coingecko/coingecko.wallet.charts.cpp @@ -77,7 +77,7 @@ namespace atomic_dex to_skip = true; continue; } - t_float_50 cur_total = (t_float_50(value[idx][1].get()) * mm2.get_balance(key)) * rate; + t_float_50 cur_total = (t_float_50(value[idx][1].get()) * mm2.get_balance_info_f(key)) * rate; total += cur_total; } if (to_skip) diff --git a/src/core/atomicdex/services/price/global.provider.cpp b/src/core/atomicdex/services/price/global.provider.cpp index 5156033aa3..d5d4bbe7e8 100644 --- a/src/core/atomicdex/services/price/global.provider.cpp +++ b/src/core/atomicdex/services/price/global.provider.cpp @@ -355,12 +355,12 @@ namespace atomic_dex } std::error_code t_ec; - const auto amount = mm2_instance.my_balance(ticker, t_ec); // from registry + const auto amount = mm2_instance.get_balance_info(ticker, t_ec); // from registry if (t_ec) { ec = t_ec; - //SPDLOG_ERROR("my_balance error: {} {}", t_ec.message(), ticker); + //SPDLOG_ERROR("get_balance_info error: {} {}", t_ec.message(), ticker); return "0.00"; } From 33b25584034ebd56f304469d59e1cd48317594d6 Mon Sep 17 00:00:00 2001 From: smk762 Date: Fri, 22 Dec 2023 01:00:15 +0800 Subject: [PATCH 42/43] fix zhtlc sync percentage display --- atomic_defi_design/Dex/Constants/General.qml | 101 +++++----- .../Dex/Exchange/ProView/DexComboBoxLine.qml | 16 +- .../Dex/Portfolio/AssetsList.qml | 29 +-- atomic_defi_design/Dex/Screens/Dashboard.qml | 2 +- atomic_defi_design/Dex/Wallet/Main.qml | 174 +++++++++++------- .../Dex/Wallet/SidebarItemDelegate.qml | 39 +++- .../atomicdex/models/qt.portfolio.model.hpp | 1 + src/core/atomicdex/pages/qt.settings.page.cpp | 14 ++ src/core/atomicdex/pages/qt.settings.page.hpp | 7 + src/core/atomicdex/pages/qt.trading.page.cpp | 4 +- .../atomicdex/services/mm2/mm2.service.cpp | 49 +++-- .../atomicdex/services/mm2/mm2.service.hpp | 2 + .../update/update.checker.service.cpp | 6 +- 13 files changed, 291 insertions(+), 153 deletions(-) diff --git a/atomic_defi_design/Dex/Constants/General.qml b/atomic_defi_design/Dex/Constants/General.qml index 0c784d0b98..d57eeb99de 100644 --- a/atomic_defi_design/Dex/Constants/General.qml +++ b/atomic_defi_design/Dex/Constants/General.qml @@ -20,6 +20,9 @@ QtObject { readonly property string custom_coin_icons_path: os_file_prefix + API.app.settings_pg.get_custom_coins_icons_path() + "/" readonly property string providerIconsPath: image_path + "providers/" + /* Timers */ + property Timer prevent_coin_disabling: Timer { interval: 5000 } + function coinIcon(ticker) { if (ticker === "" || ticker === "All" || ticker===undefined) @@ -67,19 +70,12 @@ QtObject { } function coinName(ticker) { - if(ticker === "" || ticker === "All" || ticker===undefined) { - return "" - } else { - const name = API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker).name - return name - } + return (ticker === "" || ticker === "All" || ticker===undefined) ? "" : API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker).name } function canSend(ticker, progress=100) { - if (!API.app.wallet_pg.send_available) return false - if (isZhtlc(ticker) && progress < 100) return false - return true + return !API.app.wallet_pg.send_available ? false : progress < 100 ? false : true } function isWalletOnly(ticker) @@ -92,9 +88,9 @@ QtObject { return API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker).is_faucet_coin } - function isCoinWithMemo(ticker) { - const coin_info = API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker) - return coin_info.has_memos + function isCoinWithMemo(ticker) + { + return API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker).has_memos } function getLanguage() @@ -102,68 +98,74 @@ QtObject { return API.app.settings_pg.lang } - function isZhtlc(ticker) + function isZhtlc(coin) { - const coin_info = API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker) - return coin_info.is_zhtlc_family + return API.app.portfolio_pg.global_cfg_mdl.get_coin_info(coin).is_zhtlc_family } - function isZhtlcReady(ticker) + function isZhtlcReady(coin) { - if (!isZhtlc(ticker)) return true - let activation_status = API.app.get_zhtlc_status(ticker) - let progress = zhtlcActivationProgress(activation_status, ticker) - if (progress == 100) return true - return false + return !isZhtlc(coin) ? true : (zhtlcActivationProgress(coin) == 100) ? true : false } function zhtlcActivationProgress(activation_status, coin='ARRR') { let progress = 100 - if (!activation_status.hasOwnProperty("result")) return progress - const coin_info = API.app.portfolio_pg.global_cfg_mdl.get_coin_info(coin) - let block_offset = coin_info.checkpoint_height + if (!isZhtlc(coin)) return progress + if (!activation_status.hasOwnProperty("result")) + { + return progress + } let status = activation_status.result.status let details = activation_status.result.details - // use range from checkpoint block to present + if (!status) { - return -1 + return 0 } else if (status == "Ok") { if (details.hasOwnProperty("error")) + { console.log("["+coin+"] [zhtlcActivationProgress] Error enabling: " + JSON.stringify(details.error)) + return 0 + } } else if (status == "InProgress") { if (details.hasOwnProperty("UpdatingBlocksCache")) { - block_offset = details.UpdatingBlocksCache.first_sync_block.actual - let n = details.UpdatingBlocksCache.current_scanned_block - block_offset - let d = details.UpdatingBlocksCache.latest_block - block_offset - progress = 5 + parseInt(n/d*20) + let current = details.UpdatingBlocksCache.current_scanned_block + let latest = details.UpdatingBlocksCache.latest_block + let abs_pct = parseFloat(current/latest) + progress = parseInt(15 * abs_pct) + // console.log("["+coin+"] [zhtlcActivationProgress] UpdatingBlocksCache ["+current+"/"+latest+" * "+abs_pct+" | "+progress+"%]: " + JSON.stringify(details.UpdatingBlocksCache)) } else if (details.hasOwnProperty("BuildingWalletDb")) { - block_offset = details.BuildingWalletDb.first_sync_block.actual - let n = details.BuildingWalletDb.current_scanned_block - block_offset - let d = details.BuildingWalletDb.latest_block - block_offset - progress = 45 + parseInt(n/d*60) - if (progress > 95) { - progress = 95 + let current = details.BuildingWalletDb.current_scanned_block + let latest = details.BuildingWalletDb.latest_block + let abs_pct = parseFloat(current/latest) + progress = parseInt(98 * abs_pct) + // console.log("["+coin+"] [zhtlcActivationProgress] BuildingWalletDb ["+current+"/"+latest+" * "+abs_pct+" * 98 | "+progress+"%]: " + JSON.stringify(details.BuildingWalletDb)) + if (progress < 15) { + progress = 15 } - + else if (progress > 98) { + progress = 98 + } + } + else if (details.hasOwnProperty("RequestingWalletBalance")) progress = 99 + else if (details.hasOwnProperty("ActivatingCoin")) progress = 1 + else + { + progress = 2 } - else if (details.hasOwnProperty("RequestingBalance")) progress = 95 - else if (details.hasOwnProperty("ActivatingCoin")) progress = 5 - else progress = 5 } - else console.log("["+coin+"] [zhtlcActivationProgress] Unexpected status: " + status) + else console.log("["+coin+"] [zhtlcActivationProgress] Unexpected status: " + JSON.stringify(status)) if (progress > 100) { - progress = 98 - } - + progress = 100 + } return progress } @@ -683,7 +685,6 @@ QtObject { return false } - property Timer prevent_coin_disabling: Timer { interval: 5000 } function canDisable(ticker) { if (prevent_coin_disabling.running) return false @@ -700,13 +701,9 @@ QtObject { if (ticker === "BCH") return !General.isParentCoinNeeded("BCH", "SLP") if (ticker === "UBQ") return !General.isParentCoinNeeded("UBQ", "Ubiq") if (ticker === "MOVR") return !General.isParentCoinNeeded("MOVR", "Moonriver") - if (ticker === "GLMR") return !General.isParentCoinNeeded("GLMR", "Moonbeam") - if (General.isZhtlc(ticker)) - { - let progress = General.zhtlcActivationProgress(API.app.wallet_pg.ticker_infos.activation_status, ticker) - if (progress != 100) return false - } - + if (ticker === "IRIS") return !General.isParentCoinNeeded("IRIS", "COSMOS") + if (ticker === "OSMO") return !General.isParentCoinNeeded("OSMO", "COSMOS") + if (ticker === "ATOM") return !General.isParentCoinNeeded("ATOM", "COSMOS") return true } diff --git a/atomic_defi_design/Dex/Exchange/ProView/DexComboBoxLine.qml b/atomic_defi_design/Dex/Exchange/ProView/DexComboBoxLine.qml index b0663af573..7c3404f433 100644 --- a/atomic_defi_design/Dex/Exchange/ProView/DexComboBoxLine.qml +++ b/atomic_defi_design/Dex/Exchange/ProView/DexComboBoxLine.qml @@ -20,8 +20,14 @@ RowLayout property color color: !details ? "white" : Style.getCoinColor(details.ticker) property alias middle_text: middle_line.text_value property alias bottom_text: bottom_line.text_value - property int activation_progress: Dex.General.zhtlcActivationProgress(details.activation_status, details.ticker) - + property int activation_pct: General.zhtlcActivationProgress(API.app.get_zhtlc_status(details.ticker), details.ticker) + Connections + { + target: API.app.settings_pg + function onZhtlcStatusChanged() { + activation_pct = General.zhtlcActivationProgress(API.app.get_zhtlc_status(details.ticker), details.ticker) + } + } Behavior on color { ColorAnimation { duration: Style.animationDuration } } Dex.Image @@ -40,7 +46,7 @@ RowLayout anchors.centerIn: parent anchors.fill: parent radius: 10 - enabled: Dex.General.isZhtlc(details.ticker) ? activation_progress < 100 : false + enabled: activation_pct < 100 visible: enabled opacity: .9 color: Dex.DexTheme.backgroundColor @@ -50,11 +56,11 @@ RowLayout { anchors.centerIn: parent anchors.fill: parent - enabled: Dex.General.isZhtlc(details.ticker) ? activation_progress < 100 : false + enabled: activation_pct < 100 visible: enabled horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - text: activation_progress + "%" + text: activation_pct + "%" font: Dex.DexTypo.body2 color: Dex.DexTheme.okColor } diff --git a/atomic_defi_design/Dex/Portfolio/AssetsList.qml b/atomic_defi_design/Dex/Portfolio/AssetsList.qml index 15a034af63..97bbdfcb0d 100644 --- a/atomic_defi_design/Dex/Portfolio/AssetsList.qml +++ b/atomic_defi_design/Dex/Portfolio/AssetsList.qml @@ -97,7 +97,14 @@ Dex.DexListView delegate: Rectangle { property color _idleColor: index % 2 === 1 ? Dex.CurrentTheme.listItemOddBackground : Dex.CurrentTheme.listItemEvenBackground - property int activation_progress: Dex.General.zhtlcActivationProgress(activation_status, ticker) + property int activation_pct: Dex.General.zhtlcActivationProgress(Dex.API.app.get_zhtlc_status(ticker), ticker) + Connections + { + target: Dex.API.app.settings_pg + function onZhtlcStatusChanged() { + activation_pct = Dex.General.zhtlcActivationProgress(Dex.API.app.get_zhtlc_status(ticker), ticker) + } + } width: list.width height: _assetRowHeight @@ -126,7 +133,7 @@ Dex.DexListView anchors.centerIn: parent anchors.fill: parent radius: 15 - enabled: Dex.General.isZhtlc(ticker) ? activation_progress < 100 : false + enabled: activation_pct < 100 visible: enabled opacity: .9 color: Dex.DexTheme.backgroundColor @@ -136,11 +143,11 @@ Dex.DexListView { anchors.centerIn: parent anchors.fill: parent - enabled: Dex.General.isZhtlc(ticker) ? activation_progress < 100 : false + enabled: activation_pct < 100 visible: enabled horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - text: activation_progress + "%" + text: activation_pct + "%" font: Dex.DexTypo.head8 color: Dex.DexTheme.okColor } @@ -193,11 +200,13 @@ Dex.DexListView font: Dex.DexTypo.body2 text_value: { + if (Dex.General.isZhtlc(ticker)) { - if (activation_progress != 100) + let x = activation_pct + if (x != 100) { - return qsTr("Activating: ") + activation_progress + "%" + return qsTr("Activating: ") + x + "%" } } return parseFloat(balance).toFixed(8) @@ -286,8 +295,8 @@ Dex.DexListView } Dex.CoinMenu { id: contextMenu } - } + } Dex.DefaultMouseArea { id: mouseArea @@ -297,8 +306,6 @@ Dex.DexListView onClicked: { - if (!can_change_ticker) - return if (mouse.button === Qt.RightButton) { contextMenu.can_disable = Dex.General.canDisable(ticker) @@ -313,11 +320,11 @@ Dex.DexListView onPressAndHold: { - if (!can_change_ticker) return - if (mouse.source === Qt.MouseEventNotSynthesized) + { contextMenu.can_disable = Dex.General.canDisable(ticker) contextMenu.popup() + } } } } diff --git a/atomic_defi_design/Dex/Screens/Dashboard.qml b/atomic_defi_design/Dex/Screens/Dashboard.qml index 90f3d32767..76356a991d 100644 --- a/atomic_defi_design/Dex/Screens/Dashboard.qml +++ b/atomic_defi_design/Dex/Screens/Dashboard.qml @@ -52,7 +52,7 @@ Item readonly property var api_wallet_page: API.app.wallet_pg readonly property var current_ticker_infos: api_wallet_page.ticker_infos - readonly property bool can_change_ticker: !api_wallet_page.tx_fetching_busy + readonly property bool can_disable_ticker: !api_wallet_page.tx_fetching_busy readonly property alias loader: loader readonly property alias current_component: loader.item diff --git a/atomic_defi_design/Dex/Wallet/Main.qml b/atomic_defi_design/Dex/Wallet/Main.qml index 61b3005582..9e8ddcf1d5 100644 --- a/atomic_defi_design/Dex/Wallet/Main.qml +++ b/atomic_defi_design/Dex/Wallet/Main.qml @@ -29,6 +29,14 @@ Item readonly property string headerSmallTitleFont: Style.textSizeSmall4 readonly property string headerSmallFont: Style.textSizeSmall2 readonly property string addressURL: General.getAddressExplorerURL(api_wallet_page.ticker, current_ticker_infos.address) + property int activation_pct: General.zhtlcActivationProgress(API.app.get_zhtlc_status(api_wallet_page.ticker), api_wallet_page.ticker) + Connections + { + target: API.app.settings_pg + function onZhtlcStatusChanged() { + activation_pct = General.zhtlcActivationProgress(API.app.get_zhtlc_status(api_wallet_page.ticker), api_wallet_page.ticker) + } + } function loadingPercentage(remaining) { @@ -36,8 +44,6 @@ Item } readonly property var transactions_mdl: api_wallet_page.transactions_mdl - readonly property var activation_status: current_ticker_infos.activation_status - readonly property var activation_progress: General.isZhtlc(api_wallet_page.ticker) ? General.zhtlcActivationProgress(current_ticker_infos.activation_status, api_wallet_page.ticker) : 100 Layout.fillHeight: true Layout.fillWidth: true @@ -92,12 +98,13 @@ Item Layout.preferredWidth: Layout.preferredHeight Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + DexRectangle { anchors.centerIn: parent anchors.fill: parent radius: 30 - enabled: activation_progress != 100 + enabled: activation_pct != 100 visible: enabled opacity: .9 color: DexTheme.backgroundColor @@ -107,11 +114,11 @@ Item { anchors.centerIn: parent anchors.fill: parent - enabled: activation_progress != 100 + enabled: activation_pct != 100 visible: enabled horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - text: activation_progress + "%" + text: activation_pct + "%" font: DexTypo.head8 color: DexTheme.okColor } @@ -349,17 +356,17 @@ Item Layout.rightMargin: layout_margin Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter - spacing: 25 + // spacing: 20 Item { - Layout.preferredWidth: 180 - Layout.preferredHeight: 48 + Layout.preferredWidth: 165 + Layout.preferredHeight: 40 // Send Button DefaultButton { - enabled: General.canSend(api_wallet_page.ticker, activation_progress) + enabled: General.canSend(api_wallet_page.ticker, activation_status) anchors.fill: parent radius: 18 label.text: qsTr("Send") @@ -393,9 +400,9 @@ Item // Send button error icon DefaultAlertIcon { - visible: activation_progress != 100 || api_wallet_page.send_availability_state !== "" - tooltipText: General.isZhtlc(api_wallet_page.ticker) && activation_progress != 100 - ? api_wallet_page.ticker + qsTr(" Activation: " + activation_progress + "%") + visible: activation_pct != 100 || api_wallet_page.send_availability_state !== "" + tooltipText: General.isZhtlc(api_wallet_page.ticker) && activation_pct != 100 + ? api_wallet_page.ticker + qsTr(" Activation: " + activation_pct + "%") : api_wallet_page.send_availability_state } } @@ -462,8 +469,8 @@ Item Item { - Layout.preferredWidth: 180 - Layout.preferredHeight: 48 + Layout.preferredWidth: 165 + Layout.preferredHeight: 40 // Receive Button DefaultButton @@ -500,7 +507,7 @@ Item DefaultAlertIcon { visible: !General.isZhtlcReady(api_wallet_page.ticker) - tooltipText: api_wallet_page.ticker + qsTr(" Activation: " + activation_progress + "%") + tooltipText: api_wallet_page.ticker + qsTr(" Activation: " + activation_pct + "%") } } @@ -513,12 +520,12 @@ Item // Swap Button Item { - Layout.preferredWidth: 180 - Layout.preferredHeight: 48 + Layout.preferredWidth: 165 + Layout.preferredHeight: 40 DefaultButton { - enabled: !General.isWalletOnly(api_wallet_page.ticker) && activation_progress == 100 + enabled: !General.isWalletOnly(api_wallet_page.ticker) && activation_pct == 100 anchors.fill: parent radius: 18 @@ -550,10 +557,10 @@ Item // Swap button error icon DefaultAlertIcon { - visible: General.isWalletOnly(api_wallet_page.ticker) || activation_progress != 100 + visible: General.isWalletOnly(api_wallet_page.ticker) || activation_pct != 100 tooltipText: General.isWalletOnly(api_wallet_page.ticker) ? api_wallet_page.ticker + qsTr(" is wallet only") - : api_wallet_page.ticker + qsTr(" Activation: " + activation_progress + "%") + : api_wallet_page.ticker + qsTr(" Activation: " + activation_pct + "%") } } @@ -562,15 +569,18 @@ Item // Rewards Button Item { - Layout.preferredWidth: 180 - Layout.preferredHeight: 48 + Layout.preferredWidth: 165 + Layout.preferredHeight: 40 visible: current_ticker_infos.is_claimable && !API.app.is_pin_cfg_enabled() Item { Layout.fillWidth: true } DefaultButton { - text: qsTr("Rewards") + label.text: qsTr("Rewards") + label.font.pixelSize: 16 + content.anchors.left: content.parent.left + content.anchors.leftMargin: enabled ? 23 : 48 radius: 18 font.pixelSize: 16 anchors.fill: parent @@ -580,6 +590,20 @@ Item claimRewardsModal.open() claimRewardsModal.item.prepareClaimRewards() } + Row + { + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 23 + + Qaterial.Icon + { + icon: Qaterial.Icons.leaf + size: 24 + anchors.verticalCenter: parent.verticalCenter + color: "forestgreen" + } + } } ModalLoader @@ -592,13 +616,13 @@ Item // Faucet Button Item { - Layout.preferredWidth: 180 - Layout.preferredHeight: 48 + Layout.preferredWidth: 165 + Layout.preferredHeight: 40 visible: current_ticker_infos.is_faucet_coin DefaultButton { - enabled: activation_progress == 100 + enabled: activation_pct == 100 anchors.fill: parent radius: 18 label.text: qsTr("Faucet") @@ -620,7 +644,7 @@ Item icon: Qaterial.Icons.water size: 24 anchors.verticalCenter: parent.verticalCenter - color: "cyan" + color: "royalblue" } } } @@ -628,8 +652,8 @@ Item // Faucet button error icon DefaultAlertIcon { - visible: activation_progress != 100 - tooltipText: api_wallet_page.ticker + qsTr(" Activation: " + activation_progress + "%") + visible: activation_pct != 100 + tooltipText: api_wallet_page.ticker + qsTr(" Activation: " + activation_pct + "%") } } @@ -646,16 +670,17 @@ Item // Public Key button Item { - Layout.minimumWidth: 160 - Layout.maximumWidth: 180 - Layout.fillWidth: true - Layout.preferredHeight: 48 + Layout.preferredHeight: 40 + Layout.preferredWidth: 165 visible: current_ticker_infos.name === "Tokel" || current_ticker_infos.name === "Marmara Credit Loops" DefaultButton { - text: qsTr("Public Key") + label.text: qsTr("Public Key") + label.font.pixelSize: 16 + content.anchors.left: content.parent.left + content.anchors.leftMargin: enabled ? 23 : 48 radius: 18 font.pixelSize: 16 anchors.fill: parent @@ -664,6 +689,20 @@ Item API.app.settings_pg.fetchPublicKey() publicKeyModal.open() } + Row + { + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 23 + + Qaterial.Icon + { + icon: Qaterial.Icons.keyVariant + size: 24 + anchors.verticalCenter: parent.verticalCenter + color: "gold" + } + } } ModalLoader @@ -725,6 +764,42 @@ Item } } } + + // Explorer button + Item + { + Layout.preferredHeight: 40 + Layout.preferredWidth: 165 + enabled: addressURL != "" + + + DefaultButton + { + radius: 18 + anchors.fill: parent + onClicked: Qt.openUrlExternally(addressURL) + label.text: qsTr("Explore") + label.font.pixelSize: 16 + content.anchors.left: content.parent.left + content.anchors.leftMargin: enabled ? 23 : 48 + + Row + { + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 23 + + Qaterial.Icon + { + icon: Qaterial.Icons.databaseSearch + size: 24 + anchors.verticalCenter: parent.verticalCenter + color: "steelblue" + } + } + } + } + } // Price Graph @@ -923,12 +998,12 @@ Item font.pixelSize: Style.textSize text_value: { - if (api_wallet_page.tx_fetching_busy) return qsTr("Fetching transactions...") if (General.isZhtlc(api_wallet_page.ticker)) { - if (activation_progress != 100) return qsTr("Please wait, %1 is %2").arg(api_wallet_page.ticker).arg(activation_progress) + qsTr("% activated...") + if (activation_pct != 100) return qsTr("Please wait, %1 is %2").arg(api_wallet_page.ticker).arg(activation_pct) + qsTr("% activated...") } - return qsTr('No transactions available') + if (api_wallet_page.tx_fetching_busy) return qsTr("Fetching transactions...") + return qsTr('No transactions available.') } } @@ -942,31 +1017,6 @@ Item visible: api_wallet_page.tx_fetching_busy } - // When no tx history available, or being fetched, show a button to open the explorer. - DefaultText - { - id: explorerLink - Layout.topMargin: 24 - Layout.alignment: Qt.AlignHCenter - visible: - { - if (activation_progress != 100) return false - return api_wallet_page.tx_fetching_busy ? false : addressURL == "" ? false : api_wallet_page.tx_fetching_failed - } - text_value: qsTr("Click to view your address on %1 (%2) block explorer").arg(current_ticker_infos.name).arg(api_wallet_page.ticker) - font.pixelSize: Style.textSize - color: explorer_mouseArea.containsMouse ? Dex.CurrentTheme.textSelectionColor : Dex.CurrentTheme.foregroundColor - - DefaultMouseArea - { - id: explorer_mouseArea - cursorShape: Qt.PointingHandCursor - anchors.fill: parent - hoverEnabled: true - onClicked: Qt.openUrlExternally(addressURL) - } - } - Item { Layout.fillHeight: true } } } diff --git a/atomic_defi_design/Dex/Wallet/SidebarItemDelegate.qml b/atomic_defi_design/Dex/Wallet/SidebarItemDelegate.qml index a4551cd784..74d501ec84 100644 --- a/atomic_defi_design/Dex/Wallet/SidebarItemDelegate.qml +++ b/atomic_defi_design/Dex/Wallet/SidebarItemDelegate.qml @@ -11,11 +11,20 @@ import App 1.0 GradientRectangle { - property int activation_progress: Dex.General.zhtlcActivationProgress(activation_status, ticker) - width: list_bg.width - list_bg.border.width*2 - 6 + width: list_bg.width - list_bg.border.width * 2 - 6 height: 44 radius: Dex.Style.rectangleCornerRadius + 4 + property int activation_pct: Dex.General.zhtlcActivationProgress(API.app.get_zhtlc_status(ticker), ticker) + Connections + { + target: API.app.settings_pg + function onZhtlcStatusChanged() { + activation_pct = Dex.General.zhtlcActivationProgress(API.app.get_zhtlc_status(ticker), ticker) + } + } + + start_color: api_wallet_page.ticker === ticker ? Dex.DexTheme.buttonColorEnabled : mouse_area.containsMouse ? Dex.DexTheme.buttonColorHovered : 'transparent' end_color: 'transparent' @@ -57,12 +66,13 @@ GradientRectangle width: Dex.Style.textSizeSmall4*2 anchors.verticalCenter: parent.verticalCenter + DexRectangle { anchors.centerIn: parent anchors.fill: parent radius: 15 - enabled: Dex.General.isZhtlc(ticker) ? activation_progress < 100 : false + enabled: activation_pct < 100 visible: enabled opacity: .9 color: Dex.DexTheme.backgroundColor @@ -72,11 +82,11 @@ GradientRectangle { anchors.centerIn: parent anchors.fill: parent - enabled: Dex.General.isZhtlc(ticker) ? activation_progress < 100 : false + enabled: activation_pct < 100 visible: enabled horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - text: activation_progress + "%" + text: activation_pct + "%" font: Dex.DexTypo.head8 color: Dex.DexTheme.okColor } @@ -93,7 +103,24 @@ GradientRectangle Layout.preferredWidth: 80 font: Dex.DexTypo.caption wrapMode: Text.WordWrap - text_value: mouse_area.containsMouse ? name.replace(" (TESTCOIN)", "") : ticker + text_value: + { + if (typeof name === 'undefined') + { + if (typeof ticker === 'undefined') + { + return "" + } + else + { + return ticker + } + } + else + { + return mouse_area.containsMouse ? name.replace(" (TESTCOIN)", "") : ticker + } + } color: Dex.DexTheme.foregroundColor } } diff --git a/src/core/atomicdex/models/qt.portfolio.model.hpp b/src/core/atomicdex/models/qt.portfolio.model.hpp index 5fc90f0175..c832c737f7 100644 --- a/src/core/atomicdex/models/qt.portfolio.model.hpp +++ b/src/core/atomicdex/models/qt.portfolio.model.hpp @@ -97,6 +97,7 @@ namespace atomic_dex //! Public api void initialize_portfolio(const std::vector& tickers); + bool update_activation_status(); bool update_currency_values(); bool update_balance_values(const std::vector& tickers); void adjust_percent_current_currency(QString balance_all); diff --git a/src/core/atomicdex/pages/qt.settings.page.cpp b/src/core/atomicdex/pages/qt.settings.page.cpp index 91bc84f931..d1aea10aeb 100644 --- a/src/core/atomicdex/pages/qt.settings.page.cpp +++ b/src/core/atomicdex/pages/qt.settings.page.cpp @@ -183,6 +183,20 @@ namespace atomic_dex return m_config.static_rpcpass_enabled; } + bool atomic_dex::settings_page::set_zhtlc_status(nlohmann::json data) + { + m_zhtlc_status = data; + // SPDLOG_INFO("zhtlc status: {}", m_zhtlc_status.get().dump(4)); + emit onZhtlcStatusChanged(); + return true; + } + + nlohmann::json atomic_dex::settings_page::get_zhtlc_status() + { + return m_zhtlc_status.get(); + } + + void settings_page::set_static_rpcpass_enabled(bool is_enabled) { if (m_config.static_rpcpass_enabled != is_enabled) diff --git a/src/core/atomicdex/pages/qt.settings.page.hpp b/src/core/atomicdex/pages/qt.settings.page.hpp index 2c2ab8b7b5..6d98178989 100644 --- a/src/core/atomicdex/pages/qt.settings.page.hpp +++ b/src/core/atomicdex/pages/qt.settings.page.hpp @@ -52,6 +52,7 @@ namespace atomic_dex Q_PROPERTY(bool fetching_priv_keys_busy READ is_fetching_priv_key_busy WRITE set_fetching_priv_key_busy NOTIFY privKeyStatusChanged) Q_PROPERTY(bool fetchingPublicKey READ is_fetching_public_key NOTIFY fetchingPublicKeyChanged) Q_PROPERTY(QString publicKey READ get_public_key NOTIFY publicKeyChanged) + Q_PROPERTY(bool zhtlcStatus READ get_zhtlc_status WRITE set_zhtlc_status NOTIFY onZhtlcStatusChanged) ag::ecs::system_manager& m_system_manager; @@ -64,6 +65,7 @@ namespace atomic_dex std::atomic_bool fetching_public_key{false}; QString public_key; boost::synchronized_value m_custom_token_data; + boost::synchronized_value m_zhtlc_status; public: explicit settings_page(entt::registry& registry, ag::ecs::system_manager& system_manager, std::shared_ptr app, QObject* parent = nullptr); @@ -88,6 +90,8 @@ namespace atomic_dex void set_notification_enabled(bool is_enabled); [[nodiscard]] bool is_static_rpcpass_enabled() const; void set_static_rpcpass_enabled(bool is_enabled); + void is_testcoin_filter_enabled(bool is_enabled); + bool set_zhtlc_status(nlohmann::json data); [[nodiscard]] bool is_spamfilter_enabled() const; void set_spamfilter_enabled(bool is_enabled); void set_current_currency(const QString& current_currency); @@ -126,6 +130,8 @@ namespace atomic_dex Q_INVOKABLE static QString get_export_folder(); Q_INVOKABLE static QString get_version(); Q_INVOKABLE void fetchPublicKey(); + Q_INVOKABLE nlohmann::json get_zhtlc_status(); + // QML API Properties Signals signals: @@ -143,6 +149,7 @@ namespace atomic_dex void privKeyStatusChanged(); void fetchingPublicKeyChanged(); void publicKeyChanged(); + void onZhtlcStatusChanged(); }; } // namespace atomic_dex diff --git a/src/core/atomicdex/pages/qt.trading.page.cpp b/src/core/atomicdex/pages/qt.trading.page.cpp index 2eda40fff9..e073806637 100644 --- a/src/core/atomicdex/pages/qt.trading.page.cpp +++ b/src/core/atomicdex/pages/qt.trading.page.cpp @@ -1307,7 +1307,7 @@ namespace atomic_dex { current_trading_error = TradingError::LeftParentChainNotEnabled; } - else if (mm2.get_balance(left_fee_cfg.ticker) <= 0) + else if (mm2.get_balance_info_f(left_fee_cfg.ticker) <= 0) { current_trading_error = TradingError::LeftParentChainNotEnoughBalance; } @@ -1319,7 +1319,7 @@ namespace atomic_dex { current_trading_error = TradingError::RightParentChainNotEnabled; } - else if (mm2.get_balance(right_fee_cfg.ticker) <= 0) + else if (mm2.get_balance_info_f(right_fee_cfg.ticker) <= 0) { current_trading_error = TradingError::RightParentChainNotEnoughBalance; } diff --git a/src/core/atomicdex/services/mm2/mm2.service.cpp b/src/core/atomicdex/services/mm2/mm2.service.cpp index e8e4e03fed..cccedaed77 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.cpp +++ b/src/core/atomicdex/services/mm2/mm2.service.cpp @@ -1019,7 +1019,8 @@ namespace atomic_dex { if (rpc.error) { - if (rpc.error->error_type.find("PlatformIsAlreadyActivated") != std::string::npos || rpc.error->error_type.find("TokenIsAlreadyActivated") != std::string::npos) + if (rpc.error->error_type.find("PlatformIsAlreadyActivated") != std::string::npos + || rpc.error->error_type.find("TokenIsAlreadyActivated") != std::string::npos) { SPDLOG_ERROR("{} {}: ", rpc.request.ticker, rpc.error->error_type); fetch_single_balance(get_coin_info(rpc.request.ticker)); @@ -1708,13 +1709,15 @@ namespace atomic_dex auto answer_functor = [this](nlohmann::json batch, std::vector tickers) { + m_mm2_client.async_rpc_batch_standalone(batch) .then( [this, tickers](web::http::http_response resp) mutable { try { - auto answers = mm2::basic_batch_answer(resp); + auto answers = mm2::basic_batch_answer(resp); + auto& settings_system = m_system_manager.get_system(); if (answers.count("error") == 0) { @@ -1781,6 +1784,8 @@ namespace atomic_dex // SPDLOG_INFO("{} activation ready...", tickers[idx]); std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[tickers[idx]].activation_status = z_answers[0]; + + if (z_answers[0].at("result").at("details").contains("error")) { if (z_answers[0].at("result").at("details").at("error").contains("error_type")) @@ -1849,6 +1854,7 @@ namespace atomic_dex } std::unique_lock lock(m_coin_cfg_mutex); m_coins_informations[tickers[idx]].activation_status = z_answers[0]; + settings_system.set_zhtlc_status(z_answers[0]); z_nb_try += 1; } while (z_nb_try < 10000); @@ -2166,7 +2172,7 @@ namespace atomic_dex } t_balance_request balance_request{.coin = cfg_infos.ticker}; - SPDLOG_DEBUG("Getting balance from mm2 for {} ", cfg_infos.ticker); + // SPDLOG_DEBUG("Getting balance from mm2 for {} ", cfg_infos.ticker); nlohmann::json j = mm2::template_request("my_balance"); mm2::to_json(j, balance_request); batch_array.push_back(j); @@ -2311,29 +2317,46 @@ namespace atomic_dex } t_float_50 - mm2_service::get_balance(const std::string& ticker) const + mm2_service::get_balance_info_f(const std::string& ticker) const { std::error_code ec; - std::string balance_str = my_balance(ticker, ec); + std::string balance_str = get_balance_info(ticker, ec); t_float_50 balance_f = safe_float(balance_str); // SPDLOG_DEBUG("get_balance for {}: [{}]", ticker, balance_str); return balance_f; } std::string - mm2_service::my_balance(const std::string& ticker, t_mm2_ec& ec) const + mm2_service::get_balance_info(const std::string& ticker, t_mm2_ec& ec) const { - // This happens too often + // This happens quite often std::shared_lock lock(m_balance_mutex); ///! read auto it = m_balance_informations.find(ticker); - if (it == m_balance_informations.cend()) + + if (m_coins_informations[ticker].currently_enabled) + { + if (it == m_balance_informations.cend()) + { + if (!is_zhtlc_coin_ready(ticker)) + { + return "0"; + } + SPDLOG_ERROR("get_balance_info not found for enabled coin: {}", ticker); + ec = dextop_error::balance_of_a_non_enabled_coin; + return "0"; + } + else + { + // SPDLOG_DEBUG("get_balance_info for {}: [{}]", ticker, it->second.balance); + return it->second.balance; + } + } + else { - SPDLOG_DEBUG("my_balance not found for {}", ticker); + SPDLOG_DEBUG("get_balance_info request skipped for not enabled coin: {}", ticker); ec = dextop_error::balance_of_a_non_enabled_coin; return "0"; } - // SPDLOG_DEBUG("my_balance for {}: [{}]", ticker, it->second.balance); - return it->second.balance; } void @@ -2643,7 +2666,7 @@ namespace atomic_dex mm2_service::do_i_have_enough_funds(const std::string& ticker, const t_float_50& amount) const { SPDLOG_DEBUG("do_i_have_enough_funds for {}: [{}]", ticker, amount.str(8, std::ios_base::fixed)); - t_float_50 funds = get_balance(ticker); + t_float_50 funds = get_balance_info_f(ticker); return funds >= amount; } @@ -2717,7 +2740,7 @@ namespace atomic_dex mm2_service::decrease_fake_balance(const std::string& ticker, const std::string& amount) { SPDLOG_DEBUG("decrease_fake_balance for {}: [{}]", ticker, amount); - t_float_50 balance = get_balance(ticker); + t_float_50 balance = get_balance_info_f(ticker); t_float_50 amount_f(amount); t_float_50 result = balance - amount_f; SPDLOG_DEBUG( diff --git a/src/core/atomicdex/services/mm2/mm2.service.hpp b/src/core/atomicdex/services/mm2/mm2.service.hpp index 4e60c79ffa..acec7b3cd3 100644 --- a/src/core/atomicdex/services/mm2/mm2.service.hpp +++ b/src/core/atomicdex/services/mm2/mm2.service.hpp @@ -290,6 +290,8 @@ namespace atomic_dex //! Pagination void set_orders_and_swaps_pagination_infos(std::size_t current_page = 1, std::size_t limit = 50, t_filtering_infos infos = {}); + signals: + void zhtlcStatusChanged(); }; } // namespace atomic_dex diff --git a/src/core/atomicdex/services/update/update.checker.service.cpp b/src/core/atomicdex/services/update/update.checker.service.cpp index 779d09121c..6266034e76 100644 --- a/src/core/atomicdex/services/update/update.checker.service.cpp +++ b/src/core/atomicdex/services/update/update.checker.service.cpp @@ -43,13 +43,17 @@ namespace using namespace std::string_literals; nlohmann::json resp; nlohmann::json result; + std::string resp_str = TO_STD_STR(resp_http.extract_string(true).get()); if (resp_http.status_code() != 200) { + SPDLOG_ERROR("Cannot reach the endpoint [{}]: {}", g_komodolive_endpoint); result["status"] = (QObject::tr("Cannot reach the endpoint: ") + g_komodolive_endpoint).toStdString(); } else { - resp = nlohmann::json::parse(TO_STD_STR(resp_http.extract_string(true).get())); + + resp = nlohmann::json::parse(resp_str); + SPDLOG_ERROR("Update check response: {}", resp_str); } result["rpcCode"] = resp_http.status_code(); result["currentVersion"] = atomic_dex::get_raw_version(); From b123f690d0c453f991bb9d446d9859a5cb3ad928 Mon Sep 17 00:00:00 2001 From: smk762 Date: Fri, 22 Dec 2023 02:40:51 +0800 Subject: [PATCH 43/43] restore update checker --- atomic_defi_design/Dex/NewUpdateModal.qml | 28 +-- atomic_defi_design/Dex/Wallet/Main.qml | 2 +- .../assets/languages/atomic_defi_de.ts | 160 ++++++++------- .../assets/languages/atomic_defi_en.ts | 110 ++++++----- .../assets/languages/atomic_defi_es.ts | 164 ++++++++-------- .../assets/languages/atomic_defi_fr.ts | 148 +++++++------- .../assets/languages/atomic_defi_ru.ts | 184 +++++++++--------- .../assets/languages/atomic_defi_tr.ts | 154 ++++++++------- .../update/update.checker.service.cpp | 2 +- 9 files changed, 509 insertions(+), 443 deletions(-) diff --git a/atomic_defi_design/Dex/NewUpdateModal.qml b/atomic_defi_design/Dex/NewUpdateModal.qml index eccb4867c4..fd5121ed3a 100644 --- a/atomic_defi_design/Dex/NewUpdateModal.qml +++ b/atomic_defi_design/Dex/NewUpdateModal.qml @@ -23,15 +23,16 @@ Dex.MultipageModal Component.onCompleted: { - if (Dex.API.app.updateCheckerService.updateInfo.status === "recommended" || - Dex.API.app.updateCheckerService.updateInfo.status === "required" ) + let status = Dex.API.app.updateCheckerService.updateInfo.status + if ( status === "recommended" || status === "required") { root.open() } } closePolicy: Popup.NoAutoClose - + + // Wait for response page Dex.MultipageModalContent { titleText: qsTr("Searching new updates") @@ -61,6 +62,7 @@ Dex.MultipageModal ] } + // Failed to fetch page Dex.MultipageModalContent { titleText: qsTr("Searching new updates") @@ -83,9 +85,12 @@ Dex.MultipageModal ] } + // Response page Dex.MultipageModalContent { - titleText: Dex.API.app.updateCheckerService.updateInfo.status === "required" ? qsTr("Mandatory version found") : qsTr("New version found") + titleText: Dex.API.app.updateCheckerService.updateInfo.status === "required" + ? qsTr("Mandatory version found") + : qsTr("New version found") titleAlignment: Qt.AlignHCenter spacing: 16 @@ -128,7 +133,7 @@ Dex.MultipageModal Dex.DefaultText { - text: qsTr("Your application is updated.") + text: qsTr("Your application is up to date!") } footer: @@ -148,17 +153,18 @@ Dex.MultipageModal function onUpdateInfoChanged() { + console.log("updateInfo.status: " + Dex.API.app.updateCheckerService.updateInfo.status) + console.log("updateInfo.updateNeeded: " + Dex.API.app.updateCheckerService.updateInfo.updateNeeded) + console.log("updateInfo.newVersion: " + Dex.API.app.updateCheckerService.updateInfo.newVersion) + console.log("updateInfo.downloadUrl: " + Dex.API.app.updateCheckerService.updateInfo.downloadUrl) + console.log("updateInfo.changelog: " + Dex.API.app.updateCheckerService.updateInfo.changelog) if (Dex.API.app.updateCheckerService.updateInfo) { - if (Dex.API.app.updateCheckerService.updateInfo.status === "recommended" || - Dex.API.app.updateCheckerService.updateInfo.status === "required" ) + let status = Dex.API.app.updateCheckerService.updateInfo.status + if (status === "recommended" || status === "required") { root.open() } - else - { - console.error(Dex.API.app.updateCheckerService.updateInfo.status) - } } } } diff --git a/atomic_defi_design/Dex/Wallet/Main.qml b/atomic_defi_design/Dex/Wallet/Main.qml index 9e8ddcf1d5..497e117274 100644 --- a/atomic_defi_design/Dex/Wallet/Main.qml +++ b/atomic_defi_design/Dex/Wallet/Main.qml @@ -366,7 +366,7 @@ Item // Send Button DefaultButton { - enabled: General.canSend(api_wallet_page.ticker, activation_status) + enabled: General.canSend(api_wallet_page.ticker, activation_pct) anchors.fill: parent radius: 18 label.text: qsTr("Send") diff --git a/atomic_defi_design/assets/languages/atomic_defi_de.ts b/atomic_defi_design/assets/languages/atomic_defi_de.ts index 2686cdcffb..090de3cdca 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_de.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_de.ts @@ -1412,172 +1412,172 @@ Beispiel: Kennwort = 1234 Suffix=56 Eingabe beim Login=123456 General - + %n day(s) - - %n Tag - %n Tage + + + - + %nd day - + - + %nh hours - + - + %nm minutes - + - + %ns seconds - + - + %nms milliseconds - + - + - - - + - + <b>Taker tx fee:</b> - <b>Taker tx Gebühren:</b> + - + <b>Dex tx fee:</b> - <b>Dex tx Gebühren:</b> + - + <b>Dex fee:</b> - <b>Dex Gebühren:</b> + - + <b>Maker tx fee:</b> - <b>Maker tx Gebühren:</b> + - + %1 balance is zero - + Activating %1 (%2%) - + Loading wallet... - + Min: %1 - Minimum: %1 + - + Enter an amount - Betrag eingeben + - + Trading Fee - Handelsgebühr + - + Minimum Trading Amount - Mindesthandelsbetrag + Mindesthandelsbetrag - + Wallet %1 already exists WALLETNAME - Brieftasche %1 existiert bereits + + - %1 balance is lower than the fees amount: %2 %3 - Das %1 Guthaben ist niedriger als der Gebührenbetrag: %2 %3 + Please wait for %1 to fully activate + - Tradable (after fees) %1 balance is lower than minimum trade amount - Handelbares %1 Guthaben (nach Gebühren) ist niedriger als der Mindesthandelsbetrag + %1 balance is lower than the fees amount: %2 %3 + - Please fill the price field - Bitte füllen Sie das Preisfeld aus + Tradable (after fees) %1 balance is lower than minimum trade amount + - Please fill the volume field + Please fill the price field - - - Please wait for %1 to fully activate + + Please fill the volume field - + %1 volume is lower than minimum trade amount - %1 Volumen ist niedriger als der minimale Handelsbetrag + - - + + %1 needs to be enabled in order to use %2 - %1 muss aktiviert werden, um %2 verwenden zu können + - - + + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions - Das %1 Guthaben muss finanziert werden, ein Guthaben größer Null ist erforderlich, um das Benzin von %2 Transaktionen zu bezahlen + - + Unknown Error - Unbekannter Fehler + @@ -3908,22 +3908,32 @@ Bitte wählen Sie eine neue Order aus. %1 ermöglicht Ihnen den nativen Handel über zwei verschiedene Blockchain-Netzwerke ohne Proxy-Token. Sie können auch mehrere Order mit demselben Guthaben aufgeben. Sie können beispielsweise 0,1 BTC für KMD, QTUM oder VRSC verkaufen – die erste Order, die automatisch ausgeführt wird, storniert alle anderen Orders. - + How long does each atomic swap take? Wie lange dauert ein Atomic Swap? - + Do I need to be online for the duration of the swap? Muss ich für die Dauer des Austauschs online sein? - + Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. - + + Where can I see the orderbook or market statistics online? + + + + + You can view an online orderbook and market statistics at <a href="https://markets.atomicdex.io/">https://markets.atomicdex.io/</a>, or use the Komodo Wallet in your browser at <a href="https://app.komodoplatform.com">https://app.komodoplatform.com</a>! + + + + Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. @@ -3936,12 +3946,12 @@ For this reason, we recommend cancelling orders before closing %1, or reviewing - + How are the fees on %1 calculated? Wie werden die Gebühren für %1 berechnet? - + There are two fee categories to consider when trading on %1. 1. %1 charges approximately 0.13% (1/777 of trading volume but not lower than 0.0001) as the trading fee for taker orders, and maker orders have zero fees. @@ -3958,12 +3968,12 @@ Network fees can vary greatly depending on your selected trading pair. Die Netzwerkgebühren können je nach ausgewähltem Handelspaar stark variieren. - + I see a transaction in my wallet that was marked as 'poison'. What does this mean? - + Address poisoning is a relatively new type of phishing attack, where a malicious actor aims to trick you into sending funds to an address that you did not intend to send funds to. This is often done by sending a zero value transaction to your wallet from an address which looks very similar to your actual address, with the exact same letters at the start and end. This transaction will then appear in your transaction history, with the scammer hoping you will mistake the fake address for your own and send funds to it. @@ -3974,52 +3984,52 @@ There is a toggle in settings where you can turn on/off the display of these tra - + Do you provide user support? Bieten Sie Benutzerunterstützung an? - + Yes! %1 offers support through the <a href="%2">%1 Discord server</a>. The team and the community are always happy to help! Ja! %1 bietet Support über den <a href="%2">%1 Discord server</a>. Das Team und die Community helfen Euch gerne weiter! - + Who is behind %1? Wer steckt hinter %1? - + %1 is developed by the Komodo team. Komodo is one of the most established blockchain projects working on innovative solutions like atomic swaps, Delayed Proof of Work, and an interoperable multi-chain architecture. %1 wird vom Komodo-Team entwickelt. Komodo ist eines der etabliertesten Blockchain-Projekte, das an innovativen Lösungen wie Atomic Swaps, Delayed Proof of Work und einer interoperablen Multi-Chain-Architektur arbeitet. - + Is it possible to develop my own white-label exchange on %1? Ist es möglich, meine eigene White-Label-Börse auf %1 zu entwickeln? - + Absolutely! You can read our developer documentation for more details or contact us with your partnership inquiries. Have a specific technical question? The %1 developer community is always ready to help! Auf jeden Fall! Sie können unsere Entwicklerdokumentation für weitere Details lesen oder uns mit Ihren Partnerschaftsanfragen kontaktieren. Haben Sie eine spezielle technische Frage? Die %1-Entwicklercommunity ist immer bereit zu helfen! - + Which devices can I use %1 on? Auf welchen Geräten kann ich %1 verwenden? - + %1 is available for mobile on both <a href="%2">Android and iPhone, and for desktop on Windows, Mac, and Linux</a> operating systems. %1 ist auf Mobilgeräte für <a href="%2">Android und iPhone sowie auf dem Desktop für Windows, Mac und Linux</a> Betriebssystemen erhältlich. - + Changelog Änderungsprotokoll - + Open Logs Folder Protokollordner öffnen diff --git a/atomic_defi_design/assets/languages/atomic_defi_en.ts b/atomic_defi_design/assets/languages/atomic_defi_en.ts index ce47611e61..cf7cf4185c 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_en.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_en.ts @@ -1411,7 +1411,7 @@ General - + %n day(s) @@ -1419,7 +1419,7 @@ - + %nd day @@ -1428,7 +1428,7 @@ - + %nh hours @@ -1437,7 +1437,7 @@ - + %nm minutes @@ -1446,7 +1446,7 @@ - + %ns seconds @@ -1455,7 +1455,7 @@ - + %nms milliseconds @@ -1464,117 +1464,117 @@ - + - - + <b>Taker tx fee:</b> - + <b>Dex tx fee:</b> - + <b>Dex fee:</b> - + <b>Maker tx fee:</b> - + %1 balance is zero - + Activating %1 (%2%) - + Loading wallet... - + Min: %1 - + Enter an amount - + Trading Fee - + Minimum Trading Amount - + Wallet %1 already exists WALLETNAME + - %1 balance is lower than the fees amount: %2 %3 + Please wait for %1 to fully activate - Tradable (after fees) %1 balance is lower than minimum trade amount + %1 balance is lower than the fees amount: %2 %3 - Please fill the price field + Tradable (after fees) %1 balance is lower than minimum trade amount - Please fill the volume field + Please fill the price field - - - Please wait for %1 to fully activate + + Please fill the volume field - + %1 volume is lower than minimum trade amount - - + + %1 needs to be enabled in order to use %2 - - + + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions - + Unknown Error @@ -3904,22 +3904,32 @@ Please select a new order. - + How long does each atomic swap take? - + Do I need to be online for the duration of the swap? - + Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. - + + Where can I see the orderbook or market statistics online? + + + + + You can view an online orderbook and market statistics at <a href="https://markets.atomicdex.io/">https://markets.atomicdex.io/</a>, or use the Komodo Wallet in your browser at <a href="https://app.komodoplatform.com">https://app.komodoplatform.com</a>! + + + + Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. @@ -3932,12 +3942,12 @@ For this reason, we recommend cancelling orders before closing %1, or reviewing - + How are the fees on %1 calculated? - + There are two fee categories to consider when trading on %1. 1. %1 charges approximately 0.13% (1/777 of trading volume but not lower than 0.0001) as the trading fee for taker orders, and maker orders have zero fees. @@ -3948,12 +3958,12 @@ Network fees can vary greatly depending on your selected trading pair. - + I see a transaction in my wallet that was marked as 'poison'. What does this mean? - + Address poisoning is a relatively new type of phishing attack, where a malicious actor aims to trick you into sending funds to an address that you did not intend to send funds to. This is often done by sending a zero value transaction to your wallet from an address which looks very similar to your actual address, with the exact same letters at the start and end. This transaction will then appear in your transaction history, with the scammer hoping you will mistake the fake address for your own and send funds to it. @@ -3964,52 +3974,52 @@ There is a toggle in settings where you can turn on/off the display of these tra - + Do you provide user support? - + Yes! %1 offers support through the <a href="%2">%1 Discord server</a>. The team and the community are always happy to help! - + Who is behind %1? - + %1 is developed by the Komodo team. Komodo is one of the most established blockchain projects working on innovative solutions like atomic swaps, Delayed Proof of Work, and an interoperable multi-chain architecture. - + Is it possible to develop my own white-label exchange on %1? - + Absolutely! You can read our developer documentation for more details or contact us with your partnership inquiries. Have a specific technical question? The %1 developer community is always ready to help! - + Which devices can I use %1 on? - + %1 is available for mobile on both <a href="%2">Android and iPhone, and for desktop on Windows, Mac, and Linux</a> operating systems. - + Changelog - + Open Logs Folder diff --git a/atomic_defi_design/assets/languages/atomic_defi_es.ts b/atomic_defi_design/assets/languages/atomic_defi_es.ts index 6999f70a16..dd40bbec99 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_es.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_es.ts @@ -1411,172 +1411,172 @@ General - + %n day(s) - - %n día - %n días + + + - + %nd day - + - + %nh hours - + - + %nm minutes - + - + %ns seconds - + - + %nms milliseconds - + - + - - - + - + <b>Taker tx fee:</b> - <b>Cuota de tx del taker:</b> + - + <b>Dex tx fee:</b> - <b>Cuota de tx del Dex:</b> + - + <b>Dex fee:</b> - <b>Cuota Dex:</b> + - + <b>Maker tx fee:</b> - <b>Cuota tx del maker:</b> + - + %1 balance is zero - + Activating %1 (%2%) - + Loading wallet... - + Min: %1 - Mín.: %1 + - + Enter an amount - Ingrese una cantidad + - + Trading Fee - Tarifa de Intercambio + - + Minimum Trading Amount - Cantidad Mínima de Intercambio + Cantidad Mínima de Intercambio - + Wallet %1 already exists WALLETNAME - Monedero %1 ya existe + + - %1 balance is lower than the fees amount: %2 %3 - El saldo de %1 es inferior al monto de las tarifas: %2 %3 + Please wait for %1 to fully activate + - Tradable (after fees) %1 balance is lower than minimum trade amount - El saldo de %1 (después de las tarifas) es inferior al monto mínimo de intercambio + %1 balance is lower than the fees amount: %2 %3 + - Please fill the price field - Por favor complete el campo de precio + Tradable (after fees) %1 balance is lower than minimum trade amount + - Please fill the volume field - Complete el campo de volumen + Please fill the price field + - - - Please wait for %1 to fully activate - Espere a que %1 se active por completo + + Please fill the volume field + - + %1 volume is lower than minimum trade amount - El volumen de %1 es inferior al monto mínimo de intercambio + - - + + %1 needs to be enabled in order to use %2 - %1 debe habilitarse para usar %2 + - - + + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions - se debe rellenar el saldo de %1, se requiere un saldo distinto de cero para pagar el gas de %2 transacciones + - + Unknown Error - Error Desconocido + @@ -3910,22 +3910,32 @@ Seleccione un nuevo pedido. %1 le permite comerciar de forma nativa en dos redes de cadena de bloques diferentes sin tokens de proxy. También puede realizar varios pedidos con los mismos fondos. Por ejemplo, puede vender 0,1 BTC por KMD, QTUM o VRSC: el primer pedido que se completa automáticamente cancela todos los demás pedidos. - + How long does each atomic swap take? ¿Cuánto tiempo toma cada intercambio atómico? - + Do I need to be online for the duration of the swap? ¿Necesito estar en línea durante la duración del intercambio? - + Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. - + + Where can I see the orderbook or market statistics online? + + + + + You can view an online orderbook and market statistics at <a href="https://markets.atomicdex.io/">https://markets.atomicdex.io/</a>, or use the Komodo Wallet in your browser at <a href="https://app.komodoplatform.com">https://app.komodoplatform.com</a>! + + + + Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. @@ -3938,12 +3948,12 @@ For this reason, we recommend cancelling orders before closing %1, or reviewing - + How are the fees on %1 calculated? ¿Cómo se calculan las tarifas de %1? - + There are two fee categories to consider when trading on %1. 1. %1 charges approximately 0.13% (1/777 of trading volume but not lower than 0.0001) as the trading fee for taker orders, and maker orders have zero fees. @@ -3960,12 +3970,12 @@ Network fees can vary greatly depending on your selected trading pair. Las tarifas de la red pueden variar mucho según el par comercial seleccionado. - + I see a transaction in my wallet that was marked as 'poison'. What does this mean? - + Address poisoning is a relatively new type of phishing attack, where a malicious actor aims to trick you into sending funds to an address that you did not intend to send funds to. This is often done by sending a zero value transaction to your wallet from an address which looks very similar to your actual address, with the exact same letters at the start and end. This transaction will then appear in your transaction history, with the scammer hoping you will mistake the fake address for your own and send funds to it. @@ -3976,52 +3986,52 @@ There is a toggle in settings where you can turn on/off the display of these tra - + Do you provide user support? ¿Ofrecen soporte al usuario? - + Yes! %1 offers support through the <a href="%2">%1 Discord server</a>. The team and the community are always happy to help! ¡Sí! %1 ofrece soporte a través del <a href="%2">%1 servidor Discord</a>. ¡El equipo y la comunidad siempre están dispuestos a ayudar! - + Who is behind %1? ¿Quién está detrás de %1? - + %1 is developed by the Komodo team. Komodo is one of the most established blockchain projects working on innovative solutions like atomic swaps, Delayed Proof of Work, and an interoperable multi-chain architecture. %1 está desarrollado por el equipo de Komodo. Komodo es uno de los proyectos de cadena de bloques más establecidos que trabaja en soluciones innovadoras como intercambios atómicos, prueba de trabajo retrasada y una arquitectura multicadena interoperable. - + Is it possible to develop my own white-label exchange on %1? ¿Es posible desarrollar mi propio intercambio de marca blanca en %1? - + Absolutely! You can read our developer documentation for more details or contact us with your partnership inquiries. Have a specific technical question? The %1 developer community is always ready to help! ¡Absolutamente! Puede leer nuestra documentación para desarrolladores para obtener más detalles o ponerse en contacto con nosotros con sus consultas de asociación. ¿Tiene una pregunta técnica específica? ¡La comunidad de desarrolladores de %1 siempre está lista para ayudar! - + Which devices can I use %1 on? ¿En qué dispositivos puedo usar %1? - + %1 is available for mobile on both <a href="%2">Android and iPhone, and for desktop on Windows, Mac, and Linux</a> operating systems. %1 está disponible para dispositivos móviles en <a href="%2">Android y iPhone, y para escritorio en Windows, Mac y Linux</a> sistemas operativos. - + Changelog Cambios - + Open Logs Folder Abrir Carpeta de Registros diff --git a/atomic_defi_design/assets/languages/atomic_defi_fr.ts b/atomic_defi_design/assets/languages/atomic_defi_fr.ts index 6322084b96..a53a7d640b 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_fr.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_fr.ts @@ -1411,15 +1411,15 @@ General - + %n day(s) - - %n jour(s) - %n jour(s) + + + - + %nd day @@ -1428,7 +1428,7 @@ - + %nh hours @@ -1437,7 +1437,7 @@ - + %nm minutes @@ -1446,7 +1446,7 @@ - + %ns seconds @@ -1455,7 +1455,7 @@ - + %nms milliseconds @@ -1464,119 +1464,119 @@ - + - - - + - + <b>Taker tx fee:</b> - Taxes de transaction du preneur: + - + <b>Dex tx fee:</b> - Taxes de transaction de DEX: + - + <b>Dex fee:</b> - Taxes de DEX: + - + <b>Maker tx fee:</b> - Taxes de transaction du créateur + - + %1 balance is zero - + Activating %1 (%2%) - + Loading wallet... - + Min: %1 - + Enter an amount - Entrez un montant + - + Trading Fee - Frais d'échanges + - + Minimum Trading Amount - Frais d'échange minimum + Montant de trading minimum - + Wallet %1 already exists WALLETNAME - Le portefeuille %1 existe déjà + + - %1 balance is lower than the fees amount: %2 %3 - La %1 balance est inférieur aux frais: %2 %3 + Please wait for %1 to fully activate + - Tradable (after fees) %1 balance is lower than minimum trade amount - Le solde négociable (après frais) %1 est inférieur au montant minimum de la transaction + %1 balance is lower than the fees amount: %2 %3 + - Please fill the price field - Veuillez remplir le champ de prix + Tradable (after fees) %1 balance is lower than minimum trade amount + - Please fill the volume field + Please fill the price field - - - Please wait for %1 to fully activate + + Please fill the volume field - + %1 volume is lower than minimum trade amount - Le volume de %1 est inférieur au montant minimum de la transaction + - - + + %1 needs to be enabled in order to use %2 - %1 doit être activé pour utiliser %2 + - - + + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions - Le solde %1 doit être financé, un solde différent de zéro est requis pour payer les frais de transactions de %2 + - + Unknown Error - Erreur inconnue + @@ -3904,22 +3904,32 @@ Please select a new order. - + How long does each atomic swap take? Combien de temps dure chaque échange atomique ? - + Do I need to be online for the duration of the swap? Dois-je être en ligne pendant toute la durée du swap ? - + Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. - + + Where can I see the orderbook or market statistics online? + + + + + You can view an online orderbook and market statistics at <a href="https://markets.atomicdex.io/">https://markets.atomicdex.io/</a>, or use the Komodo Wallet in your browser at <a href="https://app.komodoplatform.com">https://app.komodoplatform.com</a>! + + + + Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. @@ -3932,12 +3942,12 @@ For this reason, we recommend cancelling orders before closing %1, or reviewing - + How are the fees on %1 calculated? Comment les frais sur %1 sont-ils calculés ? - + There are two fee categories to consider when trading on %1. 1. %1 charges approximately 0.13% (1/777 of trading volume but not lower than 0.0001) as the trading fee for taker orders, and maker orders have zero fees. @@ -3948,12 +3958,12 @@ Network fees can vary greatly depending on your selected trading pair. - + I see a transaction in my wallet that was marked as 'poison'. What does this mean? - + Address poisoning is a relatively new type of phishing attack, where a malicious actor aims to trick you into sending funds to an address that you did not intend to send funds to. This is often done by sending a zero value transaction to your wallet from an address which looks very similar to your actual address, with the exact same letters at the start and end. This transaction will then appear in your transaction history, with the scammer hoping you will mistake the fake address for your own and send funds to it. @@ -3964,52 +3974,52 @@ There is a toggle in settings where you can turn on/off the display of these tra - + Do you provide user support? Fournissez-vous un support utilisateur ? - + Yes! %1 offers support through the <a href="%2">%1 Discord server</a>. The team and the community are always happy to help! Oui! %1 offre une assistance via le <a href="%2">%1 serveur Discord</a>. L'équipe et la communauté sont toujours ravies de vous aider ! - + Who is behind %1? Qui est derrière %1 ? - + %1 is developed by the Komodo team. Komodo is one of the most established blockchain projects working on innovative solutions like atomic swaps, Delayed Proof of Work, and an interoperable multi-chain architecture. %1 est développé par l'équipe de Komodo. Komodo est l'un des projets de blockchain les plus établis travaillant sur des solutions innovantes telles que les échanges atomiques, la preuve de travail différée et une architecture multichaîne interopérable. - + Is it possible to develop my own white-label exchange on %1? Est-il possible de développer mon propre échange en white label sur %1 ? - + Absolutely! You can read our developer documentation for more details or contact us with your partnership inquiries. Have a specific technical question? The %1 developer community is always ready to help! Absolument! Vous pouvez lire notre documentation développeur pour plus de détails ou nous contacter avec vos demandes de partenariat. Vous avez une question technique spécifique? La communauté de développeurs %1 est toujours prête à vous aider ! - + Which devices can I use %1 on? Sur quels appareils puis-je utiliser %1 ? - + %1 is available for mobile on both <a href="%2">Android and iPhone, and for desktop on Windows, Mac, and Linux</a> operating systems. %1 est disponible pour mobile sur <a href="%2">Android et iPhone, et pour ordinateur de bureau sur les systèmes d'exploitation Windows, Mac et Linux</a>. - + Changelog Changelog - + Open Logs Folder Ouvrir le répertoire de logs diff --git a/atomic_defi_design/assets/languages/atomic_defi_ru.ts b/atomic_defi_design/assets/languages/atomic_defi_ru.ts index b45eb47eba..a74d0fd4bb 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_ru.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_ru.ts @@ -1411,178 +1411,178 @@ General - + %n day(s) - - %n день - %n дня - %n дней + + + + - + %nd day - - %nд - %nд - %nд + + + + - + %nh hours - - %nч - %nч - %nч + + + + - + %nm minutes - - %nмин - %nмин - %nмин + + + + - + %ns seconds - - %nсек - %nсек - %nсек + + + + - + %nms milliseconds - - %nмс - %nмс - %nмс + + + + - + - - - + - + <b>Taker tx fee:</b> - + <b>Dex tx fee:</b> - + <b>Dex fee:</b> - + <b>Maker tx fee:</b> - + %1 balance is zero - + Activating %1 (%2%) - + Loading wallet... - + Min: %1 - Мин: %1 + - + Enter an amount - Введите количество + - + Trading Fee - Торговая комиссия + - + Minimum Trading Amount - Минимальный объем сделки + Минимальный торговый объем - + Wallet %1 already exists WALLETNAME - Кошелек %1 уже существует + + - %1 balance is lower than the fees amount: %2 %3 - %1 баланс менее чем размер комиссий: %2 %3 + Please wait for %1 to fully activate + - Tradable (after fees) %1 balance is lower than minimum trade amount - Торгуемый (после комиссий) баланс %1 - меньше минимальной суммы сделки + %1 balance is lower than the fees amount: %2 %3 + - Please fill the price field - Пожалуйста, укажите цену + Tradable (after fees) %1 balance is lower than minimum trade amount + - Please fill the volume field + Please fill the price field - - - Please wait for %1 to fully activate + + Please fill the volume field - + %1 volume is lower than minimum trade amount - Сумма %1 меньше минимальной суммы сделки + - - + + %1 needs to be enabled in order to use %2 - %1 должен быть активным для использования %2 + - - + + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions - нужно пополнить баланс %1 для оплаты газа %2 транзакций + - + Unknown Error - Неизвестная ошибка + @@ -3910,22 +3910,32 @@ Please select a new order. - + How long does each atomic swap take? Сколько времени занимает каждый атомарный своп? - + Do I need to be online for the duration of the swap? Необходимо ли мне быть в сети во время свопа? - + Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. - + + Where can I see the orderbook or market statistics online? + + + + + You can view an online orderbook and market statistics at <a href="https://markets.atomicdex.io/">https://markets.atomicdex.io/</a>, or use the Komodo Wallet in your browser at <a href="https://app.komodoplatform.com">https://app.komodoplatform.com</a>! + + + + Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. @@ -3938,12 +3948,12 @@ For this reason, we recommend cancelling orders before closing %1, or reviewing - + How are the fees on %1 calculated? Как подсчитывается %1 комиссия? - + There are two fee categories to consider when trading on %1. 1. %1 charges approximately 0.13% (1/777 of trading volume but not lower than 0.0001) as the trading fee for taker orders, and maker orders have zero fees. @@ -3954,12 +3964,12 @@ Network fees can vary greatly depending on your selected trading pair. - + I see a transaction in my wallet that was marked as 'poison'. What does this mean? - + Address poisoning is a relatively new type of phishing attack, where a malicious actor aims to trick you into sending funds to an address that you did not intend to send funds to. This is often done by sending a zero value transaction to your wallet from an address which looks very similar to your actual address, with the exact same letters at the start and end. This transaction will then appear in your transaction history, with the scammer hoping you will mistake the fake address for your own and send funds to it. @@ -3970,52 +3980,52 @@ There is a toggle in settings where you can turn on/off the display of these tra - + Do you provide user support? Предоставляете ли вы поддержку пользователей? - + Yes! %1 offers support through the <a href="%2">%1 Discord server</a>. The team and the community are always happy to help! Да! %1 предоставляет саппорт через <a href="%2">%1 Discord сервер</a>. Команда и сообщество проекта всегда рады помочь! - + Who is behind %1? Кто создал %1? - + %1 is developed by the Komodo team. Komodo is one of the most established blockchain projects working on innovative solutions like atomic swaps, Delayed Proof of Work, and an interoperable multi-chain architecture. %1 разрабатывается командой Komodo. Komodo один из наиболее известных блокчейн проектов который работает над такими инновационными решениями как Атомарные Свопы, "Отложенный" PoW, а также над совместимой мульти-чейн архитектурой. - + Is it possible to develop my own white-label exchange on %1? Возможно ли разработать децентрализованную биржу с моим брендом на %1? - + Absolutely! You can read our developer documentation for more details or contact us with your partnership inquiries. Have a specific technical question? The %1 developer community is always ready to help! Обязательно! Вы можете прочитать нашу документацию для разработчиков для более детального ревью или же связаться с нашей командой по поводу партнерства. Есть очень специфичный технический вопрос? %1 наше комьюнити разработчиков всегда готово помочь! - + Which devices can I use %1 on? На каких устройствах я могу использовать %1 ? - + %1 is available for mobile on both <a href="%2">Android and iPhone, and for desktop on Windows, Mac, and Linux</a> operating systems. %1 доступен для Android и iOS мобильных устройв <a href="%2">, и для операционных систем Windows, Mac и Linux</a> на PC. - + Changelog Журнал изменений - + Open Logs Folder Открыть папку с логами diff --git a/atomic_defi_design/assets/languages/atomic_defi_tr.ts b/atomic_defi_design/assets/languages/atomic_defi_tr.ts index ad83b47c82..5708dea400 100644 --- a/atomic_defi_design/assets/languages/atomic_defi_tr.ts +++ b/atomic_defi_design/assets/languages/atomic_defi_tr.ts @@ -1411,166 +1411,166 @@ General - + %n day(s) - - %n gün + + - + %nd day - - %ng + + - + %nh hours - - %nsa + + - + %nm minutes - - %nd + + - + %ns seconds - - %ns + + - + %nms milliseconds - - %nms + + - + - - - + - + <b>Taker tx fee:</b> - + <b>Dex tx fee:</b> - + <b>Dex fee:</b> - + <b>Maker tx fee:</b> - + %1 balance is zero - + Activating %1 (%2%) - + Loading wallet... - + Min: %1 - + Enter an amount - Bir miktar gir + - + Trading Fee - Takas Ücreti + - + Minimum Trading Amount - Minimum Takas Hacmi + Minimum Takas Tutarı - + Wallet %1 already exists WALLETNAME - %1 cüzdanı zaten mevcut + + - %1 balance is lower than the fees amount: %2 %3 - %1 bakiye ücret tutarının altında: %2 %3 + Please wait for %1 to fully activate + - Tradable (after fees) %1 balance is lower than minimum trade amount - Takas edilebilir (ücretlerden sonra)%1 bakiyesi minimum işlem ücretinden düşük + %1 balance is lower than the fees amount: %2 %3 + - Please fill the price field - Lütfen fiyat alanını doldurun + Tradable (after fees) %1 balance is lower than minimum trade amount + - Please fill the volume field + Please fill the price field - - - Please wait for %1 to fully activate + + Please fill the volume field - + %1 volume is lower than minimum trade amount - %1 hacmi, minimum işlem ücretinden düşük + - - + + %1 needs to be enabled in order to use %2 - - + + %1 balance needs to be funded, a non-zero balance is required to pay the gas of %2 transactions - + Unknown Error - Bilinmeyen Hata + @@ -3898,22 +3898,32 @@ Please select a new order. - + How long does each atomic swap take? Her bir atomik takas ne kadar sürer? - + Do I need to be online for the duration of the swap? Takas süresi boyunca çevrimiçi olmam gerekir mi? - + Several factors determine the processing time for each swap. The block time of the traded assets depends on each network (Bitcoin typically being the slowest) Additionally, the user can customize security preferences. For example, (you can ask %1 to consider a KMD transaction as final after just 3 confirmations which makes the swap time shorter compared to waiting for a <a href="https://komodoplatform.com/security-delayed-proof-of-work-dpow/">notarization</a>. - + + Where can I see the orderbook or market statistics online? + + + + + You can view an online orderbook and market statistics at <a href="https://markets.atomicdex.io/">https://markets.atomicdex.io/</a>, or use the Komodo Wallet in your browser at <a href="https://app.komodoplatform.com">https://app.komodoplatform.com</a>! + + + + Yes. You must remain connected to the internet and have your app running to successfully complete each atomic swap (very short breaks in connectivity are usually fine). Otherwise, there is risk of trade cancellation if you are a maker, and risk of loss of funds if you are a taker. To mitigate this, 'watchertower' nodes have been deployed to monitor the dex network for you and, where possible, complete the swaps for you if your app goes offline. The atomic swap protocol requires both participants to stay online and monitor the involved blockchains for the process to stay atomic. @@ -3926,12 +3936,12 @@ For this reason, we recommend cancelling orders before closing %1, or reviewing - + How are the fees on %1 calculated? %1 üzerinde işlem ücretleri nasıl hesaplanır? - + There are two fee categories to consider when trading on %1. 1. %1 charges approximately 0.13% (1/777 of trading volume but not lower than 0.0001) as the trading fee for taker orders, and maker orders have zero fees. @@ -3942,12 +3952,12 @@ Network fees can vary greatly depending on your selected trading pair. - + I see a transaction in my wallet that was marked as 'poison'. What does this mean? - + Address poisoning is a relatively new type of phishing attack, where a malicious actor aims to trick you into sending funds to an address that you did not intend to send funds to. This is often done by sending a zero value transaction to your wallet from an address which looks very similar to your actual address, with the exact same letters at the start and end. This transaction will then appear in your transaction history, with the scammer hoping you will mistake the fake address for your own and send funds to it. @@ -3958,52 +3968,52 @@ There is a toggle in settings where you can turn on/off the display of these tra - + Do you provide user support? Kullanıcı desteği sağlıyor musunuz? - + Yes! %1 offers support through the <a href="%2">%1 Discord server</a>. The team and the community are always happy to help! - + Who is behind %1? %1 arkasında kim var? - + %1 is developed by the Komodo team. Komodo is one of the most established blockchain projects working on innovative solutions like atomic swaps, Delayed Proof of Work, and an interoperable multi-chain architecture. %1, Komodo ekibi tarafından geliştirilmiştir. Komodo, atomik takaslar, Gecikmeli Çalışma Kanıtı ve birlikte çalışabilir bir çok zincirli mimari gibi yenilikçi çözümler üzerinde çalışan en köklü blok zinciri projelerinden biridir. - + Is it possible to develop my own white-label exchange on %1? %1 üzerinde kendi markamla borsamı geliştirmem mümkün mü? - + Absolutely! You can read our developer documentation for more details or contact us with your partnership inquiries. Have a specific technical question? The %1 developer community is always ready to help! Kesinlikle! Daha fazla ayrıntı için geliştirici belgelerimizi okuyabilir veya ortaklık sorularınız için bizimle iletişime geçebilirsiniz. Belirli bir teknik sorunuz mu var? %1 geliştirici topluluğu her zaman yardıma hazır! - + Which devices can I use %1 on? %1 'i hangi cihazlarda kullanabilirim? - + %1 is available for mobile on both <a href="%2">Android and iPhone, and for desktop on Windows, Mac, and Linux</a> operating systems. - + Changelog Değişim günlüğü - + Open Logs Folder Günlük Kaydı Klasörünü Aç diff --git a/src/core/atomicdex/services/update/update.checker.service.cpp b/src/core/atomicdex/services/update/update.checker.service.cpp index 6266034e76..a1da62b8d8 100644 --- a/src/core/atomicdex/services/update/update.checker.service.cpp +++ b/src/core/atomicdex/services/update/update.checker.service.cpp @@ -53,7 +53,7 @@ namespace { resp = nlohmann::json::parse(resp_str); - SPDLOG_ERROR("Update check response: {}", resp_str); + // SPDLOG_ERROR("Update check response: {}", resp_str); } result["rpcCode"] = resp_http.status_code(); result["currentVersion"] = atomic_dex::get_raw_version();