Wallet: WalletManager: implement proxy support

This commit is contained in:
xiphon
2020-07-30 16:55:06 +00:00
parent 7eeda0a8f0
commit 5ea99a73e7
4 changed files with 100 additions and 7 deletions

View File

@@ -561,3 +561,26 @@ void WalletManager::onPassphraseEntered(const QString &passphrase, bool enter_on
m_passphraseReceiver->onPassphraseEntered(passphrase, enter_on_device, entry_abort);
}
}
QString WalletManager::proxyAddress() const
{
QMutexLocker locker(&m_proxyMutex);
return m_proxyAddress;
}
void WalletManager::setProxyAddress(QString address)
{
m_scheduler.run([this, address] {
{
QMutexLocker locker(&m_proxyMutex);
if (!m_pimpl->setProxy(address.toStdString()))
{
qCritical() << "Failed to set proxy address" << address;
}
m_proxyAddress = std::move(address);
}
emit proxyAddressChanged();
});
}