Allow hardware device reads without lock. (#6517)

This commit is contained in:
Tomasz Drwięga
2017-09-15 14:47:24 +02:00
committed by Arkadiy Paronyan
parent 980418898a
commit 3e60b221c8
3 changed files with 45 additions and 47 deletions

View File

@@ -168,9 +168,9 @@ impl AccountProvider {
pub fn new(sstore: Box<SecretStore>, settings: AccountProviderSettings) -> Self {
let mut hardware_store = None;
if settings.enable_hardware_wallets {
match HardwareWalletManager::new() {
let key_path = if settings.hardware_wallet_classic_key { KeyPath::EthereumClassic } else { KeyPath::Ethereum };
match HardwareWalletManager::new(key_path) {
Ok(manager) => {
manager.set_key_path(if settings.hardware_wallet_classic_key { KeyPath::EthereumClassic } else { KeyPath::Ethereum });
hardware_store = Some(manager)
},
Err(e) => debug!("Error initializing hardware wallets: {}", e),