From: tobtoht Date: Tue, 18 Mar 2025 14:31:05 +0000 (+0100) Subject: remove prestium integration X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=897afaaabb0bea91e9514e0253552af86efddc32;p=gamesguru%2Ffeather.git remove prestium integration --- diff --git a/src/main.cpp b/src/main.cpp index 214f202f..b3a6ea23 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,7 +7,6 @@ #include "config-feather.h" #include "constants.h" #include "utils/EventFilter.h" -#include "utils/os/Prestium.h" #include "WindowManager.h" #include "config.h" #include @@ -176,13 +175,6 @@ if (AttachConsole(ATTACH_PARENT_PROCESS)) { if (!QDir().mkpath(walletDir)) qCritical() << "Unable to create dir: " << walletDir; - // Prestium initial config - if (conf()->get(Config::firstRun).toBool() && Prestium::detect()) { - conf()->set(Config::proxy, Config::Proxy::i2p); - conf()->set(Config::socks5Port, Prestium::i2pPort()); - conf()->set(Config::hideUpdateNotifications, true); - } - if (parser.isSet("use-local-tor")) conf()->set(Config::useLocalTor, true); diff --git a/src/utils/os/Prestium.cpp b/src/utils/os/Prestium.cpp deleted file mode 100644 index 0acbbd0a..00000000 --- a/src/utils/os/Prestium.cpp +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -// SPDX-FileCopyrightText: The Monero Project - -#include "Prestium.h" - -#include -#include - -#include "utils/Utils.h" - -#define PRESTIUM_DEFAULT_PORT 4448 - -bool Prestium::detect() -{ - return QSysInfo::prettyProductName().contains("Prestium"); -} - -int Prestium::i2pPort() -{ - QString portStr = qgetenv("PRESTIUM_FEATHER_I2P_PORT"); - if (portStr.isEmpty()) { - return PRESTIUM_DEFAULT_PORT; - } - - int port = portStr.toInt(); - if (port < 1024 || port > 65535) { - return PRESTIUM_DEFAULT_PORT; - } - - return port; -} \ No newline at end of file diff --git a/src/utils/os/Prestium.h b/src/utils/os/Prestium.h deleted file mode 100644 index d49a51f3..00000000 --- a/src/utils/os/Prestium.h +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -// SPDX-FileCopyrightText: The Monero Project - -#ifndef FEATHER_PRESTIUM_H -#define FEATHER_PRESTIUM_H - - -class Prestium { -public: - static bool detect(); - static int i2pPort(); -}; - -#endif //FEATHER_PRESTIUM_H diff --git a/src/widgets/NetworkProxyWidget.cpp b/src/widgets/NetworkProxyWidget.cpp index d307b3dd..a50b893e 100644 --- a/src/widgets/NetworkProxyWidget.cpp +++ b/src/widgets/NetworkProxyWidget.cpp @@ -9,7 +9,6 @@ #include #include "utils/config.h" -#include "utils/os/Prestium.h" NetworkProxyWidget::NetworkProxyWidget(QWidget *parent) : QWidget(parent) @@ -95,11 +94,7 @@ void NetworkProxyWidget::updatePort() { break; } case Config::Proxy::i2p: { - if (Prestium::detect()) { - socks5port = 4448; - } else { - socks5port = 4447; - } + socks5port = 4447; break; } default: { diff --git a/src/wizard/PageNetwork.cpp b/src/wizard/PageNetwork.cpp index c15b7aaf..3ff23435 100644 --- a/src/wizard/PageNetwork.cpp +++ b/src/wizard/PageNetwork.cpp @@ -8,7 +8,6 @@ #include "constants.h" #include "utils/nodes.h" -#include "utils/os/Prestium.h" #include "Utils.h" #include "WalletWizard.h" @@ -57,10 +56,6 @@ PageNetwork::PageNetwork(QWidget *parent) } int PageNetwork::nextId() const { - if (Prestium::detect()) { - return WalletWizard::Page_NetworkWebsocket; - } - return WalletWizard::Page_NetworkProxy; }