diff --git a/src/core/atomicdex/services/price/global.provider.cpp b/src/core/atomicdex/services/price/global.provider.cpp index 267320df26..5bb7ca6bdc 100644 --- a/src/core/atomicdex/services/price/global.provider.cpp +++ b/src/core/atomicdex/services/price/global.provider.cpp @@ -19,43 +19,6 @@ #include "atomicdex/pages/qt.settings.page.hpp" #include "atomicdex/services/price/komodo_prices/komodo.prices.provider.hpp" -namespace -{ - web::http::client::http_client_config g_openrates_cfg{[]() - { - web::http::client::http_client_config cfg; - cfg.set_validate_certificates(false); - cfg.set_timeout(std::chrono::seconds(5)); - return cfg; - }()}; - t_http_client_ptr g_openrates_client = std::make_unique(FROM_STD_STR("https://defi-stats.komodo.earth"), g_openrates_cfg); - pplx::cancellation_token_source g_token_source; - - pplx::task - async_fetch_fiat_rates() - { - web::http::http_request req; - req.set_method(web::http::methods::GET); - req.set_request_uri(FROM_STD_STR("api/v3/rates/fixer_io")); - //SPDLOG_INFO("req: {}", TO_STD_STR(req.to_string())); - return g_openrates_client->request(req, g_token_source.get_token()); - } - - nlohmann::json - process_fetch_fiat_answer(web::http::http_response resp) - { - nlohmann::json answer; - if (resp.status_code() == 200) - { - answer = nlohmann::json::parse(TO_STD_STR(resp.extract_string(true).get())); - return answer; - } - - SPDLOG_WARN("unable to fetch last open rates"); - return answer; - } -} // namespace - namespace { std::string @@ -92,7 +55,6 @@ namespace } } // namespace - namespace atomic_dex { global_price_service::global_price_service(entt::registry& registry, ag::ecs::system_manager& system_manager, atomic_dex::cfg& cfg) :