Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #3378 from ethcore/fix-wallet-naming
Browse files Browse the repository at this point in the history
Wallet files shouldn't give away the address
  • Loading branch information
gavofyork authored Nov 17, 2016
2 parents 76ac87a + 24cb0ae commit 64a4b60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ethstore/src/dir/disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use std::collections::HashMap;
use time;
use ethkey::Address;
use {json, SafeAccount, Error};
use json::UUID;
use super::KeyDirectory;

const IGNORED_FILES: &'static [&'static str] = &["thumbs.db", "address_book.json"];
Expand Down Expand Up @@ -112,7 +113,7 @@ impl KeyDirectory for DiskDirectory {
// build file path
let filename = account.filename.as_ref().cloned().unwrap_or_else(|| {
let timestamp = time::strftime("%Y-%m-%dT%H-%M-%S", &time::now_utc()).expect("Time-format string is valid.");
format!("UTC--{}Z--{:?}", timestamp, account.address)
format!("UTC--{}Z--{}", timestamp, UUID::from(account.id))
});

// update account filename
Expand Down

0 comments on commit 64a4b60

Please sign in to comment.