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