revert conflicts
This commit is contained in:
parent
ba6e47669b
commit
3c31a9fc78
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// Copyright (c) 2020-2021, The Monero Project.
|
||||
|
||||
#ifndef WOWLET_APPCONTEXT_H
|
||||
#define WOWLET_APPCONTEXT_H
|
||||
#ifndef FEATHER_APPCONTEXT_H
|
||||
#define FEATHER_APPCONTEXT_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QProcess>
|
||||
|
@ -17,7 +17,7 @@
|
|||
#include "utils/xmrig.h"
|
||||
#include "utils/wsclient.h"
|
||||
#include "utils/txfiathistory.h"
|
||||
#include "utils/WowletSeed.h"
|
||||
#include "utils/FeatherSeed.h"
|
||||
#include "widgets/RedditPost.h"
|
||||
#include "widgets/CCSEntry.h"
|
||||
#include "utils/RestoreHeightLookup.h"
|
||||
|
@ -89,11 +89,17 @@ public:
|
|||
static QMap<QString, QString> txCache;
|
||||
static TxFiatHistory *txFiatHistory;
|
||||
|
||||
QList<WalletKeysFiles> listWallets() {
|
||||
// return listing of wallet .keys items
|
||||
m_walletKeysFilesModel->refresh();
|
||||
return m_walletKeysFilesModel->listWallets();
|
||||
}
|
||||
|
||||
// libwalletqt
|
||||
bool refreshed = false;
|
||||
WalletManager *walletManager;
|
||||
Wallet *currentWallet = nullptr;
|
||||
void createWallet(WowletSeed seed, const QString &path, const QString &password);
|
||||
void createWallet(FeatherSeed seed, const QString &path, const QString &password);
|
||||
void createWalletViewOnly(const QString &path, const QString &password, const QString &address, const QString &viewkey, const QString &spendkey, quint64 restoreHeight);
|
||||
void createWalletFinish(const QString &password);
|
||||
void syncStatusUpdated(quint64 height, quint64 target);
|
||||
|
@ -111,7 +117,7 @@ public:
|
|||
|
||||
public slots:
|
||||
void onOpenWallet(const QString& path, const QString &password);
|
||||
void onCreateTransaction(const QString &address, quint64 amount, const QString &description, bool all);
|
||||
void onCreateTransaction(QString address, quint64 amount, const QString description, bool all);
|
||||
void onCreateTransactionMultiDest(const QVector<QString> &addresses, const QVector<quint64> &amounts, const QString &description);
|
||||
void onCancelTransaction(PendingTransaction *tx, const QVector<QString> &address);
|
||||
void onSweepOutput(const QString &keyImage, QString address, bool churn, int outputs) const;
|
||||
|
@ -150,7 +156,7 @@ signals:
|
|||
void synchronized();
|
||||
void blockHeightWSUpdated(QMap<QString, int> heights);
|
||||
void walletRefreshed();
|
||||
void walletOpened();
|
||||
void walletOpened(Wallet *wallet);
|
||||
void walletCreatedError(const QString &msg);
|
||||
void walletCreated(Wallet *wallet);
|
||||
void walletOpenedError(QString msg);
|
||||
|
@ -160,12 +166,12 @@ signals:
|
|||
void createTransactionCancelled(const QVector<QString> &address, double amount);
|
||||
void createTransactionSuccess(PendingTransaction *tx, const QVector<QString> &address);
|
||||
void redditUpdated(QList<QSharedPointer<RedditPost>> &posts);
|
||||
void nodesUpdated(QList<QSharedPointer<WowletNode>> &nodes);
|
||||
void nodesUpdated(QList<QSharedPointer<FeatherNode>> &nodes);
|
||||
void ccsUpdated(QList<QSharedPointer<CCSEntry>> &entries);
|
||||
void suchWowUpdated(const QJsonArray &such_data);
|
||||
void nodeSourceChanged(NodeSource nodeSource);
|
||||
void XMRigDownloads(const QJsonObject &data);
|
||||
void setCustomNodes(QList<WowletNode> nodes);
|
||||
void setCustomNodes(QList<FeatherNode> nodes);
|
||||
void openAliasResolveError(const QString &msg);
|
||||
void openAliasResolved(const QString &address, const QString &openAlias);
|
||||
void setRestoreHeightError(const QString &msg);
|
||||
|
@ -177,10 +183,10 @@ signals:
|
|||
void setTitle(const QString &title); // set window title
|
||||
|
||||
private:
|
||||
WalletKeysFilesModel *m_walletKeysFilesModel;
|
||||
const int m_donationBoundary = 15;
|
||||
QTimer m_storeTimer;
|
||||
// @TODO: Replace url
|
||||
QUrl m_wsUrl = QUrl(QStringLiteral("ws://feathercitimllbmdktu6cmjo3fizgmyfrntntqzu6xguqa2rlq5cgid.onion/ws"));
|
||||
};
|
||||
|
||||
#endif //WOWLET_APPCONTEXT_H
|
||||
#endif //FEATHER_APPCONTEXT_H
|
||||
|
|
|
@ -83,11 +83,11 @@ XMRigWidget::XMRigWidget(AppContext *ctx, QWidget *parent) :
|
|||
|
||||
// username/password
|
||||
connect(ui->lineEdit_password, &QLineEdit::editingFinished, [=]() {
|
||||
m_ctx->currentWallet->setCacheAttribute("wowlet.xmrig_password", ui->lineEdit_password->text());
|
||||
m_ctx->currentWallet->setCacheAttribute("feather.xmrig_password", ui->lineEdit_password->text());
|
||||
m_ctx->storeWallet();
|
||||
});
|
||||
connect(ui->lineEdit_address, &QLineEdit::editingFinished, [=]() {
|
||||
m_ctx->currentWallet->setCacheAttribute("wowlet.xmrig_username", ui->lineEdit_address->text());
|
||||
m_ctx->currentWallet->setCacheAttribute("feather.xmrig_username", ui->lineEdit_address->text());
|
||||
m_ctx->storeWallet();
|
||||
});
|
||||
|
||||
|
@ -102,19 +102,19 @@ void XMRigWidget::onWalletClosed() {
|
|||
ui->lineEdit_address->setText("");
|
||||
}
|
||||
|
||||
void XMRigWidget::onWalletOpened(){
|
||||
void XMRigWidget::onWalletOpened(Wallet *wallet){
|
||||
// Xmrig username
|
||||
auto username = m_ctx->currentWallet->getCacheAttribute("wowlet.xmrig_username");
|
||||
auto username = m_ctx->currentWallet->getCacheAttribute("feather.xmrig_username");
|
||||
if(!username.isEmpty())
|
||||
ui->lineEdit_address->setText(username);
|
||||
|
||||
// Xmrig passwd
|
||||
auto password = m_ctx->currentWallet->getCacheAttribute("wowlet.xmrig_password");
|
||||
auto password = m_ctx->currentWallet->getCacheAttribute("feather.xmrig_password");
|
||||
if(!password.isEmpty()) {
|
||||
ui->lineEdit_password->setText(password);
|
||||
} else {
|
||||
ui->lineEdit_password->setText("wowlet");
|
||||
m_ctx->currentWallet->setCacheAttribute("wowlet.xmrig_password", ui->lineEdit_password->text());
|
||||
ui->lineEdit_password->setText("featherwallet");
|
||||
m_ctx->currentWallet->setCacheAttribute("feather.xmrig_password", ui->lineEdit_password->text());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,8 +145,8 @@ void XMRigWidget::onStartClicked() {
|
|||
xmrigPath = config()->get(Config::xmrigPath).toString();
|
||||
|
||||
// username is receiving address usually
|
||||
auto username = m_ctx->currentWallet->getCacheAttribute("wowlet.xmrig_username");
|
||||
auto password = m_ctx->currentWallet->getCacheAttribute("wowlet.xmrig_password");
|
||||
auto username = m_ctx->currentWallet->getCacheAttribute("feather.xmrig_username");
|
||||
auto password = m_ctx->currentWallet->getCacheAttribute("feather.xmrig_password");
|
||||
|
||||
if(username.isEmpty()) {
|
||||
QString err = "Please specify a receiving address on the Settings screen";
|
||||
|
|
Loading…
Reference in New Issue