Add support for creating hardware wallet

This commit is contained in:
stoffu
2018-06-04 17:05:29 +09:00
parent 5029baec33
commit 057b5cdec7
11 changed files with 277 additions and 8 deletions

View File

@@ -104,6 +104,20 @@ Wallet *WalletManager::createWalletFromKeys(const QString &path, const QString &
return m_currentWallet;
}
Wallet *WalletManager::createWalletFromDevice(const QString &path, const QString &password, NetworkType::Type nettype,
const QString &deviceName, uint64_t restoreHeight, const QString &subaddressLookahead)
{
QMutexLocker locker(&m_mutex);
if (m_currentWallet) {
qDebug() << "Closing open m_currentWallet" << m_currentWallet;
delete m_currentWallet;
m_currentWallet = NULL;
}
Monero::Wallet * w = m_pimpl->createWalletFromDevice(path.toStdString(), password.toStdString(), static_cast<Monero::NetworkType>(nettype),
deviceName.toStdString(), restoreHeight, subaddressLookahead.toStdString());
m_currentWallet = new Wallet(w);
return m_currentWallet;
}
QString WalletManager::closeWallet()
{