|
|
|
@ -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
|
|
|
|
|