mirror of
https://github.com/feather-wallet/feather.git
synced 2025-04-16 18:01:54 +00:00
remove prestium integration
This commit is contained in:
parent
2a9af40ece
commit
897afaaabb
5 changed files with 1 additions and 64 deletions
src
|
@ -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 <wallet/api/wallet2_api.h>
|
||||
|
@ -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);
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// SPDX-FileCopyrightText: The Monero Project
|
||||
|
||||
#include "Prestium.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QSysInfo>
|
||||
|
||||
#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;
|
||||
}
|
|
@ -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
|
|
@ -9,7 +9,6 @@
|
|||
#include <QWidget>
|
||||
|
||||
#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: {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue