diff --git a/CMakeLists.txt b/CMakeLists.txt
index e81aa062df..3f08fec6ba 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_bd69fbd-mac-x86-64.zip)
+ URL https://sdk.devbuilds.komodo.earth/dev/mm2_a9f606d-mac-x86-64.zip)
elseif (UNIX AND NOT APPLE)
FetchContent_Declare(mm2
URL https://sdk.devbuilds.komodo.earth/dev/mm2_e9559c2-linux-x86-64.zip)
else ()
FetchContent_Declare(mm2
- URL https://sdk.devbuilds.komodo.earth/dev/mm2_bd69fbd-win-x86-64.zip)
+ URL https://sdk.devbuilds.komodo.earth/dev/mm2_a9f606d-win-x86-64.zip)
endif ()
#FetchContent_Declare(qmaterial URL https://github.com/KomodoPlatform/Qaterial/archive/last-clang-working-2.zip)
diff --git a/atomic_defi_design/Dex/Screens/Dashboard.qml b/atomic_defi_design/Dex/Screens/Dashboard.qml
index a59d814663..90f3d32767 100644
--- a/atomic_defi_design/Dex/Screens/Dashboard.qml
+++ b/atomic_defi_design/Dex/Screens/Dashboard.qml
@@ -53,7 +53,6 @@ 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 is_dex_banned: !API.app.ip_checker.ip_authorized
readonly property alias loader: loader
readonly property alias current_component: loader.item
diff --git a/atomic_defi_design/Dex/Support/SupportModal.qml b/atomic_defi_design/Dex/Support/SupportModal.qml
index 1e17485a06..591bf8587d 100644
--- a/atomic_defi_design/Dex/Support/SupportModal.qml
+++ b/atomic_defi_design/Dex/Support/SupportModal.qml
@@ -178,12 +178,6 @@ There is a toggle in settings where you can turn on/off the display of these tra
title: qsTr("Which devices can I use %1 on?").arg(API.app_name)
text: qsTr('%1 is available for mobile on both Android and iPhone, and for desktop on Windows, Mac, and Linux operating systems.').arg(API.app_name).arg(API.app_website_url)
}
-
- FAQLine
- {
- title: qsTr("Compliance Info")
- text: qsTr("Due to regulatory and legal circumstances the citizens of certain jurisdictions including, but not limited to, the United States of America, Canada, Hong Kong, Israel, Singapore, Sudan, Austria, Iran and any other state, country or other jurisdiction that is embargoed by the United States of America or the European Union are not allowed to use this application.")
- }
}
}
diff --git a/atomic_defi_design/Dex/Wallet/Main.qml b/atomic_defi_design/Dex/Wallet/Main.qml
index 7ecf682d91..61b3005582 100644
--- a/atomic_defi_design/Dex/Wallet/Main.qml
+++ b/atomic_defi_design/Dex/Wallet/Main.qml
@@ -513,7 +513,6 @@ Item
// Swap Button
Item
{
- visible: !is_dex_banned
Layout.preferredWidth: 180
Layout.preferredHeight: 48
diff --git a/ci_tools_atomic_dex/ci_scripts/osx_script.sh b/ci_tools_atomic_dex/ci_scripts/osx_script.sh
index 4c9ce17f30..35c101b085 100755
--- a/ci_tools_atomic_dex/ci_scripts/osx_script.sh
+++ b/ci_tools_atomic_dex/ci_scripts/osx_script.sh
@@ -1,13 +1,7 @@
#!/bin/bash
# Workaround for https://github.com/actions/setup-python/issues/577
-rm /usr/local/bin/2to3* || true
-rm /usr/local/bin/idle3* || true
-rm /usr/local/bin/pydoc3* || true
-rm /usr/local/bin/python3* || true
-rm /usr/local/bin/python3-config* || true
-brew install llvm@16
brew update
brew install autoconf \
automake \
@@ -18,6 +12,7 @@ brew install autoconf \
gnu-sed \
coreutils \
libtool \
+ llvm \
gnu-getopt
pip3 install yq
diff --git a/cmake/project.metadata.cmake b/cmake/project.metadata.cmake
index c91418487b..86ce55acb4 100644
--- a/cmake/project.metadata.cmake
+++ b/cmake/project.metadata.cmake
@@ -13,7 +13,6 @@ 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_SECOND_PRIMARY_COIN "KMD") ## Second main coin of the DEX, will be enabled by default and will be the default right ticker for trading
-option(DISABLE_GEOBLOCKING "Enable to disable geoblocking (for dev purpose)" OFF)
set(DEX_REPOSITORY_OWNER ${DEX_COMPANY})
set(DEX_REPOSITORY_NAME "komodo-wallet-desktop")
set(DEX_CHECKSUM_API_URL "https://komodo.earth/static/checksum.json")
@@ -147,4 +146,4 @@ macro(generate_linux_metafiles)
configure_file(${CMAKE_CURRENT_LIST_DIR}/assets/logo/dex-logo-64.png ${CMAKE_CURRENT_LIST_DIR}/cmake/install/linux/dex-logo-64.png COPYONLY) # Configures x64 Linux logo
configure_file(${CMAKE_CURRENT_LIST_DIR}/assets/logo/dex-logo.png ${CMAKE_CURRENT_LIST_DIR}/cmake/install/linux/dex-logo.png COPYONLY)
-endmacro()
\ No newline at end of file
+endmacro()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5d33a981a0..70769cbc6a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -41,10 +41,6 @@ if (APPLE)
endmacro()
adex_add_framework(Security ${PROJECT_NAME}_core)
endif ()
-if (DISABLE_GEOBLOCKING)
- message(STATUS "Disabling Geoblocking for dev purpose")
- target_compile_definitions(${PROJECT_NAME}_core INTERFACE -DDISABLE_GEOBLOCKING)
-endif ()
target_link_libraries(${PROJECT_NAME}_core INTERFACE SortFilterProxyModel)
diff --git a/src/app/app.cpp b/src/app/app.cpp
index d7cd93d9a7..f8a3fd8b2b 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -491,7 +491,6 @@ namespace atomic_dex
// get_dispatcher().sink().connect<&application::on_refresh_update_status_event>(*this);
//! MM2 system need to be created before the GUI and give the instance to the gui
- system_manager_.create_system();
system_manager_.create_system(system_manager_);
auto& settings_page_system = system_manager_.create_system(system_manager_, m_app, this);
auto& portfolio_system = system_manager_.create_system(system_manager_, this);
@@ -905,18 +904,6 @@ namespace atomic_dex
}
} // namespace atomic_dex
-//! IP checker
-namespace atomic_dex
-{
- ip_service_checker*
- application::get_ip_checker() const
- {
- auto ptr = const_cast(std::addressof(system_manager_.get_system()));
- assert(ptr != nullptr);
- return ptr;
- }
-} // namespace atomic_dex
-
//! Exporter service
namespace atomic_dex
{
diff --git a/src/app/app.hpp b/src/app/app.hpp
index 297f25150d..efed4479d4 100644
--- a/src/app/app.hpp
+++ b/src/app/app.hpp
@@ -45,7 +45,6 @@
#include "atomicdex/pages/qt.wallet.page.hpp"
#include "atomicdex/services/exporter/exporter.service.hpp"
#include "atomicdex/services/internet/internet.checker.service.hpp"
-#include "atomicdex/services/ip/ip.checker.service.hpp"
#include "atomicdex/services/mm2/mm2.service.hpp"
#include "atomicdex/services/price/global.provider.hpp"
#include "atomicdex/services/update/update.checker.service.hpp"
@@ -69,7 +68,6 @@ namespace atomic_dex
Q_PROPERTY(portfolio_page_ptr portfolio_pg READ get_portfolio_page NOTIFY portfolioPageChanged)
Q_PROPERTY(notification_manager* notification_mgr READ get_notification_manager)
Q_PROPERTY(internet_service_checker* internet_checker READ get_internet_checker NOTIFY internetCheckerChanged)
- Q_PROPERTY(ip_service_checker* ip_checker READ get_ip_checker NOTIFY ipCheckerChanged)
Q_PROPERTY(exporter_service* exporter_service READ get_exporter_service NOTIFY exporterServiceChanged)
Q_PROPERTY(trading_page* trading_pg READ get_trading_page NOTIFY tradingPageChanged)
Q_PROPERTY(wallet_page* wallet_pg READ get_wallet_page NOTIFY walletPageChanged)
@@ -135,7 +133,6 @@ namespace atomic_dex
settings_page* get_settings_page() const;
qt_wallet_manager* get_wallet_mgr() const;
internet_service_checker* get_internet_checker() const;
- ip_service_checker* get_ip_checker() const;
update_checker_service* get_update_checker_service() const;
[[nodiscard]] zcash_params_service* get_zcash_params_service() const;
exporter_service* get_exporter_service() const;
@@ -184,7 +181,6 @@ namespace atomic_dex
void tradingPageChanged();
void settingsPageChanged();
void internetCheckerChanged();
- void ipCheckerChanged();
void exporterServiceChanged();
public slots:
void exit_handler();
diff --git a/src/core/atomicdex/services/ip/ip.checker.service.cpp b/src/core/atomicdex/services/ip/ip.checker.service.cpp
deleted file mode 100644
index 26223954cd..0000000000
--- a/src/core/atomicdex/services/ip/ip.checker.service.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/******************************************************************************
- * 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. *
- * *
- ******************************************************************************/
-
-//! PCH
-#include "atomicdex/pch.hpp"
-
-//! Deps
-#include
-
-//! Project headers
-#include "atomicdex/utilities/cpprestsdk.utilities.hpp"
-#include "ip.checker.service.hpp"
-
-namespace
-{
- web::http::client::http_client_config g_ip_cfg{[]() {
- web::http::client::http_client_config cfg;
- cfg.set_validate_certificates(false);
- cfg.set_timeout(std::chrono::seconds(45));
- return cfg;
- }()};
-
- t_http_client_ptr g_ip_proxy_client{std::make_unique(FROM_STD_STR("https://komodo.earth:3335"), g_ip_cfg)};
- t_http_client_ptr g_ipify_client{std::make_unique(FROM_STD_STR("https://api.ipify.org"), g_ip_cfg)};
-
- pplx::task
- async_check_retrieve_ip(t_http_client_ptr& client, const std::string& uri)
- {
- web::http::http_request req;
- req.set_method(web::http::methods::GET);
- if (not uri.empty())
- {
- req.set_request_uri(FROM_STD_STR(uri));
- }
- return client->request(req);
- }
-} // namespace
-
-//! Constructor
-namespace atomic_dex
-{
- ip_service_checker::ip_service_checker(entt::registry& registry, QObject* parent) : QObject(parent), system(registry)
- {
- using namespace std::chrono_literals;
- m_update_clock = std::chrono::high_resolution_clock::now();
-#if !defined(DISABLE_GEOBLOCKING)
- auto ip_validator_functor = [this](std::string ip) {
- async_check_retrieve_ip(g_ip_proxy_client, "/api/v1/ip_infos/" + ip)
- .then([this, ip](web::http::http_response resp) {
- if (resp.status_code() == 200)
- {
- SPDLOG_INFO("Successfully retrieve ip informations of {}", ip);
- std::string body = TO_STD_STR(resp.extract_string(true).get());
- auto answer = nlohmann::json::parse(body);
- this->m_country = answer.at("country").get();
- if (this->m_non_authorized_countries.count(answer.at("country").get()) == 1)
- {
- this->m_external_ip_authorized = false;
- emit this->ipCountryChanged();
- emit this->ipAuthorizedStatusChanged();
- SPDLOG_ERROR("ip {} is not authorized in your country: {}", ip, m_country.get());
- }
- else
- {
- SPDLOG_INFO("ip {} is authorized in your country -> {}", ip, m_country.get());
- }
- }
- })
- .then(&handle_exception_pplx_task);
- };
- async_check_retrieve_ip(g_ipify_client, "")
- .then([this, ip_validator_functor](web::http::http_response resp) {
- if (resp.status_code() == 200)
- {
- std::string ip = TO_STD_STR(resp.extract_string(true).get());
- this->m_external_ip = ip;
- SPDLOG_INFO("my ip address is: [{}]", ip);
- ip_validator_functor(ip);
- }
- })
- .then(&handle_exception_pplx_task);
-#endif
- SPDLOG_INFO("ip_service_checker created");
- }
-} // namespace atomic_dex
-
-//! Override
-namespace atomic_dex
-{
- void
- ip_service_checker::update()
- {
- }
-
- bool
- ip_service_checker::is_my_ip_authorized() const
- {
- return m_external_ip_authorized.load();
- }
-
- QString
- atomic_dex::ip_service_checker::my_country_ip() const
- {
- return QString::fromStdString(m_country.get());
- }
-} // namespace atomic_dex
diff --git a/src/core/atomicdex/services/ip/ip.checker.service.hpp b/src/core/atomicdex/services/ip/ip.checker.service.hpp
deleted file mode 100644
index c9c3aaac89..0000000000
--- a/src/core/atomicdex/services/ip/ip.checker.service.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/******************************************************************************
- * 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. *
- * *
- ******************************************************************************/
-
-#pragma once
-
-//! STD
-#include
-
-//! Deps
-#include
-#include
-#include
-
-//! QT
-#include
-
-namespace atomic_dex
-{
- class ip_service_checker final : public QObject, public ag::ecs::pre_update_system
- {
- //! Q_Object definition
- Q_OBJECT
-
- //! Properties
- Q_PROPERTY(bool ip_authorized READ is_my_ip_authorized NOTIFY ipAuthorizedStatusChanged)
- Q_PROPERTY(QString ip_country READ my_country_ip NOTIFY ipCountryChanged)
-
- //! Private typedefs
- using t_update_time_point = std::chrono::high_resolution_clock::time_point;
-
- //! Private members
- t_update_time_point m_update_clock;
- double m_timer;
- boost::synchronized_value m_external_ip;
- boost::synchronized_value m_country;
- std::atomic_bool m_external_ip_authorized{true}; ///< true by default
- const std::unordered_set m_non_authorized_countries{"CA", "IL", "IR", "SS", "USA", "HK", "SG", "AT", "US"};
-
- signals:
- void ipAuthorizedStatusChanged();
- void ipCountryChanged();
-
- public:
- //! Constructor
- explicit ip_service_checker(entt::registry& registry, QObject* parent = nullptr);
- ~ip_service_checker() final = default;
-
- //! Public override
- void update() final;
-
- [[nodiscard]] bool is_my_ip_authorized() const ;
- [[nodiscard]] QString my_country_ip() const ;
- };
-} // namespace atomic_dex
-
-REFL_AUTO(type(atomic_dex::ip_service_checker))