EthMultiStore
This commit is contained in:
@@ -18,7 +18,6 @@ use std::{fs, io};
|
||||
use std::path::{PathBuf, Path};
|
||||
use std::collections::HashMap;
|
||||
use time;
|
||||
use ethkey::Address;
|
||||
use {json, SafeAccount, Error};
|
||||
use json::UUID;
|
||||
use super::KeyDirectory;
|
||||
@@ -138,12 +137,12 @@ impl KeyDirectory for DiskDirectory {
|
||||
Ok(account)
|
||||
}
|
||||
|
||||
fn remove(&self, address: &Address) -> Result<(), Error> {
|
||||
fn remove(&self, account: &SafeAccount) -> Result<(), Error> {
|
||||
// enumerate all entries in keystore
|
||||
// and find entry with given address
|
||||
let to_remove = try!(self.files())
|
||||
.into_iter()
|
||||
.find(|&(_, ref account)| &account.address == address);
|
||||
.find(|&(_, ref acc)| acc == account);
|
||||
|
||||
// remove it
|
||||
match to_remove {
|
||||
|
||||
Reference in New Issue
Block a user