mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-09 19:32:03 +02:00
WalletManager: async setDaemonAddress
This commit is contained in:
parent
c286c7e5a8
commit
8bc9fbecaf
6
main.qml
6
main.qml
@ -256,7 +256,7 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Local daemon settings
|
// Local daemon settings
|
||||||
walletManager.setDaemonAddress(localDaemonAddress)
|
walletManager.setDaemonAddressAsync(localDaemonAddress);
|
||||||
|
|
||||||
// enable timers
|
// enable timers
|
||||||
userInActivityTimer.running = true;
|
userInActivityTimer.running = true;
|
||||||
@ -608,7 +608,7 @@ ApplicationWindow {
|
|||||||
persistentSettings.useRemoteNode = true;
|
persistentSettings.useRemoteNode = true;
|
||||||
currentDaemonAddress = persistentSettings.remoteNodeAddress;
|
currentDaemonAddress = persistentSettings.remoteNodeAddress;
|
||||||
currentWallet.initAsync(currentDaemonAddress);
|
currentWallet.initAsync(currentDaemonAddress);
|
||||||
walletManager.setDaemonAddress(currentDaemonAddress);
|
walletManager.setDaemonAddressAsync(currentDaemonAddress);
|
||||||
remoteNodeConnected = true;
|
remoteNodeConnected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -620,7 +620,7 @@ ApplicationWindow {
|
|||||||
persistentSettings.useRemoteNode = false;
|
persistentSettings.useRemoteNode = false;
|
||||||
currentDaemonAddress = localDaemonAddress
|
currentDaemonAddress = localDaemonAddress
|
||||||
currentWallet.initAsync(currentDaemonAddress);
|
currentWallet.initAsync(currentDaemonAddress);
|
||||||
walletManager.setDaemonAddress(currentDaemonAddress);
|
walletManager.setDaemonAddressAsync(currentDaemonAddress);
|
||||||
remoteNodeConnected = false;
|
remoteNodeConnected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,9 +344,11 @@ QString WalletManager::paymentIdFromAddress(const QString &address, NetworkType:
|
|||||||
return QString::fromStdString(Monero::Wallet::paymentIdFromAddress(address.toStdString(), static_cast<Monero::NetworkType>(nettype)));
|
return QString::fromStdString(Monero::Wallet::paymentIdFromAddress(address.toStdString(), static_cast<Monero::NetworkType>(nettype)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void WalletManager::setDaemonAddress(const QString &address)
|
void WalletManager::setDaemonAddressAsync(const QString &address)
|
||||||
{
|
{
|
||||||
m_pimpl->setDaemonAddress(address.toStdString());
|
QtConcurrent::run([this, address] {
|
||||||
|
m_pimpl->setDaemonAddress(address.toStdString());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WalletManager::connected() const
|
bool WalletManager::connected() const
|
||||||
|
@ -150,7 +150,7 @@ public:
|
|||||||
|
|
||||||
Q_INVOKABLE QString paymentIdFromAddress(const QString &address, NetworkType::Type nettype) const;
|
Q_INVOKABLE QString paymentIdFromAddress(const QString &address, NetworkType::Type nettype) const;
|
||||||
|
|
||||||
Q_INVOKABLE void setDaemonAddress(const QString &address);
|
Q_INVOKABLE void setDaemonAddressAsync(const QString &address);
|
||||||
Q_INVOKABLE bool connected() const;
|
Q_INVOKABLE bool connected() const;
|
||||||
Q_INVOKABLE quint64 networkDifficulty() const;
|
Q_INVOKABLE quint64 networkDifficulty() const;
|
||||||
Q_INVOKABLE quint64 blockchainHeight() const;
|
Q_INVOKABLE quint64 blockchainHeight() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user