mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-29 04:08:43 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87d7609022 |
+2
-2
@@ -141,12 +141,12 @@
|
||||
<widget class="QComboBox" name="comboBox_blockExplorer">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>muchwow.lol</string>
|
||||
<string>explore.wownero.com</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>explorer.suchwow.xyz</string>
|
||||
<string>kryfi.com</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
|
||||
@@ -26,12 +26,13 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
||||
{Config::openVRSkin,{QS("openVRSkin"), "default"}},
|
||||
{Config::openVRStreamerMode,{QS("openVRStreamerMode"), false}},
|
||||
{Config::preferredFiatCurrency,{QS("preferredFiatCurrency"), "USD"}},
|
||||
{Config::blockExplorer,{QS("blockExplorer"), "explorer.suchwow.xyz"}},
|
||||
{Config::blockExplorer,{QS("blockExplorer"), "kryfi.com"}},
|
||||
{Config::walletDirectory,{QS("walletDirectory"), ""}},
|
||||
{Config::autoOpenWalletPath,{QS("autoOpenWalletPath"), ""}},
|
||||
{Config::walletPath,{QS("walletPath"), ""}},
|
||||
{Config::xmrigPath,{QS("xmrigPath"), ""}},
|
||||
{Config::wownerodPath, {QS("wownerodPath"), ""}},
|
||||
{Config::extraArgs, {QS("extraArgs"), ""}},
|
||||
{Config::nodes,{QS("nodes"), "{}"}},
|
||||
{Config::websocketEnabled,{QS("websocketEnabled"), true}},
|
||||
{Config::nodeSource,{QS("nodeSource"), 0}},
|
||||
|
||||
@@ -34,6 +34,7 @@ public:
|
||||
walletPath,
|
||||
xmrigPath,
|
||||
wownerodPath,
|
||||
extraArgs,
|
||||
nodes,
|
||||
websocketEnabled,
|
||||
nodeSource,
|
||||
|
||||
+3
-3
@@ -240,10 +240,10 @@ QString Utils::copyFromClipboard() {
|
||||
|
||||
QString Utils::blockExplorerLink(const QString &txid) {
|
||||
auto explorer = config()->get(Config::blockExplorer).toString();
|
||||
if(explorer.startsWith("explorer.suchwow.xyz")) {
|
||||
return QString("https://explorer.suchwow.xyz/tx/%1").arg(txid);
|
||||
if(explorer.startsWith("kryfi.com")) {
|
||||
return QString("https://kryfi.com/explorer/wownero/tx/%1").arg(txid);
|
||||
} else {
|
||||
return QString("https://muchwow.lol/tx?id=%1").arg(txid);
|
||||
return QString("https://explore.wownero.com/tx/%1").arg(txid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-2
@@ -9,7 +9,7 @@
|
||||
#include "utils/xmrig.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
XmRig::XmRig(const QString &configDir, QObject *parent) :
|
||||
XmRig::XmRig(const QString &configDir, QObject *parent, QString extraArgs) :
|
||||
QObject(parent),
|
||||
m_statusTimer(new QTimer(this))
|
||||
{
|
||||
@@ -38,7 +38,7 @@ void XmRig::stop() {
|
||||
m_statusTimer->stop();
|
||||
}
|
||||
|
||||
bool XmRig::start(const QString &path, int threads) {
|
||||
bool XmRig::start(const QString &path, int threads, QString extraArgs) {
|
||||
m_ctx = MainWindow::getContext();
|
||||
|
||||
auto state = m_process.state();
|
||||
@@ -72,6 +72,9 @@ bool XmRig::start(const QString &path, int threads) {
|
||||
arguments << "--start-mining" << m_ctx->currentWallet->address(0, 0);
|
||||
arguments << "--spendkey" << privateSpendKey;
|
||||
|
||||
// additional arguments to wownerod a user can define
|
||||
arguments << extraArgs;
|
||||
|
||||
QString cmd = QString("%1 %2").arg(path, arguments.join(" "));
|
||||
cmd = cmd.replace(privateSpendKey, "[redacted]");
|
||||
emit output(cmd.toUtf8());
|
||||
|
||||
+2
-2
@@ -27,10 +27,10 @@ class XmRig : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit XmRig(const QString &configDir, QObject *parent = nullptr);
|
||||
explicit XmRig(const QString &configDir, QObject *parent = nullptr, QString extraArgs = nullptr);
|
||||
void prepare();
|
||||
|
||||
bool start(const QString &path, int threads);
|
||||
bool start(const QString &path, int threads, QString extraArgs);
|
||||
void stop();
|
||||
|
||||
DaemonMiningState daemonMiningState = DaemonMiningState::idle;
|
||||
|
||||
@@ -63,6 +63,10 @@ XMRigWidget::XMRigWidget(AppContext *ctx, QWidget *parent) :
|
||||
if(!path.isEmpty())
|
||||
ui->lineEdit_path->setText(path);
|
||||
|
||||
auto extraArgs = config()->get(Config::extraArgs).toString();
|
||||
if(!extraArgs.isEmpty())
|
||||
ui->extraArgs->setText(extraArgs);
|
||||
|
||||
connect(ui->lineEdit_path, &QLineEdit::textChanged, [=] {
|
||||
config()->set(Config::wownerodPath, ui->lineEdit_path->text().trimmed());
|
||||
});
|
||||
@@ -208,7 +212,8 @@ void XMRigWidget::onClearClicked() {
|
||||
|
||||
void XMRigWidget::onStartClicked() {
|
||||
auto binPath = config()->get(Config::wownerodPath).toString();
|
||||
if(!m_ctx->XMRig->start(binPath, m_threads)) return;
|
||||
auto extraArgs = config()->get(Config::extraArgs).toString();
|
||||
if(!m_ctx->XMRig->start(binPath, m_threads, extraArgs)) return;
|
||||
|
||||
ui->btn_start->setEnabled(false);
|
||||
ui->btn_stop->setEnabled(true);
|
||||
|
||||
@@ -227,13 +227,31 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="extraArgs_label">
|
||||
<property name="text">
|
||||
<string>Extra Args</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="extraArgs">
|
||||
<property name="placeholderText">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_threads">
|
||||
<property name="text">
|
||||
<string>CPU threads</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="3" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QSlider" name="threadSlider">
|
||||
|
||||
Reference in New Issue
Block a user