From 3c31a9fc787fe8e9c5881c8629ffe3329a36a50a Mon Sep 17 00:00:00 2001 From: wowario Date: Wed, 31 Mar 2021 20:00:38 +0300 Subject: [PATCH] revert conflicts --- src/appcontext.h | 26 ++++++++++++++++---------- src/widgets/xmrigwidget.cpp | 18 +++++++++--------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/appcontext.h b/src/appcontext.h index 03198df..cc69167 100644 --- a/src/appcontext.h +++ b/src/appcontext.h @@ -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 #include @@ -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 txCache; static TxFiatHistory *txFiatHistory; + QList 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 &addresses, const QVector &amounts, const QString &description); void onCancelTransaction(PendingTransaction *tx, const QVector &address); void onSweepOutput(const QString &keyImage, QString address, bool churn, int outputs) const; @@ -150,7 +156,7 @@ signals: void synchronized(); void blockHeightWSUpdated(QMap 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 &address, double amount); void createTransactionSuccess(PendingTransaction *tx, const QVector &address); void redditUpdated(QList> &posts); - void nodesUpdated(QList> &nodes); + void nodesUpdated(QList> &nodes); void ccsUpdated(QList> &entries); void suchWowUpdated(const QJsonArray &such_data); void nodeSourceChanged(NodeSource nodeSource); void XMRigDownloads(const QJsonObject &data); - void setCustomNodes(QList nodes); + void setCustomNodes(QList 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 diff --git a/src/widgets/xmrigwidget.cpp b/src/widgets/xmrigwidget.cpp index 75843c0..3574fbe 100644 --- a/src/widgets/xmrigwidget.cpp +++ b/src/widgets/xmrigwidget.cpp @@ -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";