2022-02-22 08:02:34 +00:00
|
|
|
#pragma once
|
2022-02-14 14:38:41 +00:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
#include "interfaces/controller_interface.h"
|
|
|
|
#include "signals.h"
|
2022-02-21 18:03:38 +00:00
|
|
|
#include "wallet_accounts/service_interface.h"
|
|
|
|
#include "wallet_accounts/wallet_account.h"
|
2022-02-14 14:38:41 +00:00
|
|
|
|
2022-02-16 21:51:04 +00:00
|
|
|
namespace Modules::Main::Wallet::Accounts
|
2022-02-14 14:38:41 +00:00
|
|
|
{
|
2022-02-16 21:51:04 +00:00
|
|
|
class Controller : public QObject, public IController
|
2022-02-14 14:38:41 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit Controller(std::shared_ptr<Wallets::ServiceInterface> walletService, QObject* parent = nullptr);
|
|
|
|
|
|
|
|
void init() override;
|
|
|
|
|
|
|
|
QList<Wallets::WalletAccountDto> getWalletAccounts();
|
2022-02-21 17:07:16 +00:00
|
|
|
QString generateNewAccount(const QString& password, const QString& accountName, const QString& color);
|
2022-02-22 08:02:34 +00:00
|
|
|
QString addAccountsFromPrivateKey(const QString& privateKey,
|
|
|
|
const QString& password,
|
|
|
|
const QString& accountName,
|
|
|
|
const QString& color);
|
|
|
|
QString addAccountsFromSeed(const QString& seedPhrase,
|
|
|
|
const QString& password,
|
|
|
|
const QString& accountName,
|
|
|
|
const QString& color);
|
|
|
|
QString addWatchOnlyAccount(const QString& address, const QString& accountName, const QString& color);
|
2022-02-21 17:07:16 +00:00
|
|
|
void deleteAccount(const QString& address);
|
2022-02-14 14:38:41 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::shared_ptr<Wallets::ServiceInterface> m_walletServicePtr;
|
|
|
|
};
|
2022-02-16 21:51:04 +00:00
|
|
|
} // namespace Modules::Main::Wallet::Accounts
|