mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-04 01:17:25 -04:00
view only wallets
wizard: fix dots on pw page wizard: fix focus on pw field viewOnly: added success message
This commit is contained in:
@@ -158,6 +158,15 @@ void Wallet::initAsync(const QString &daemonAddress, quint64 upperTransactionLim
|
||||
m_walletImpl->initAsync(daemonAddress.toStdString(), upperTransactionLimit);
|
||||
}
|
||||
|
||||
//! create a view only wallet
|
||||
bool Wallet::createViewOnly(const QString &path, const QString &password) const
|
||||
{
|
||||
// Create path
|
||||
QDir d = QFileInfo(path).absoluteDir();
|
||||
d.mkpath(d.absolutePath());
|
||||
return m_walletImpl->createWatchOnly(path.toStdString(),password.toStdString(),m_walletImpl->getSeedLanguage());
|
||||
}
|
||||
|
||||
bool Wallet::connectToDaemon()
|
||||
{
|
||||
return m_walletImpl->connectToDaemon();
|
||||
@@ -168,6 +177,11 @@ void Wallet::setTrustedDaemon(bool arg)
|
||||
m_walletImpl->setTrustedDaemon(arg);
|
||||
}
|
||||
|
||||
bool Wallet::viewOnly() const
|
||||
{
|
||||
return m_walletImpl->watchOnly();
|
||||
}
|
||||
|
||||
quint64 Wallet::balance() const
|
||||
{
|
||||
return m_walletImpl->balance();
|
||||
|
||||
@@ -36,7 +36,7 @@ class Wallet : public QObject
|
||||
Q_PROPERTY(QString path READ path)
|
||||
Q_PROPERTY(AddressBookModel * addressBookModel READ addressBookModel)
|
||||
Q_PROPERTY(AddressBook * addressBook READ addressBook)
|
||||
|
||||
Q_PROPERTY(bool viewOnly READ viewOnly)
|
||||
|
||||
public:
|
||||
|
||||
@@ -98,6 +98,9 @@ public:
|
||||
//! initializes wallet asynchronously
|
||||
Q_INVOKABLE void initAsync(const QString &daemonAddress, quint64 upperTransactionLimit, bool isRecovering = false, quint64 restoreHeight = 0);
|
||||
|
||||
//! create a view only wallet
|
||||
Q_INVOKABLE bool createViewOnly(const QString &path, const QString &password) const;
|
||||
|
||||
//! connects to daemon
|
||||
Q_INVOKABLE bool connectToDaemon();
|
||||
|
||||
@@ -110,6 +113,9 @@ public:
|
||||
//! returns unlocked balance
|
||||
Q_INVOKABLE quint64 unlockedBalance() const;
|
||||
|
||||
//! returns if view only wallet
|
||||
Q_INVOKABLE bool viewOnly() const;
|
||||
|
||||
//! returns current wallet's block height
|
||||
//! (can be less than daemon's blockchain height when wallet sync in progress)
|
||||
Q_INVOKABLE quint64 blockChainHeight() const;
|
||||
|
||||
Reference in New Issue
Block a user