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

Commit

Permalink
Fix account list double 0x display (#8596)
Browse files Browse the repository at this point in the history
* Remove unused self import

* Fix account list double 0x display
  • Loading branch information
sorpaas authored and ascjones committed May 14, 2018
1 parent f65ef0e commit 06c94ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parity/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn new(n: NewAccount) -> Result<String, String> {
let secret_store = Box::new(secret_store(dir, Some(n.iterations))?);
let acc_provider = AccountProvider::new(secret_store, AccountProviderSettings::default());
let new_account = acc_provider.new_account(&password).map_err(|e| format!("Could not create new account: {}", e))?;
Ok(format!("0x{:?}", new_account))
Ok(format!("0x{:x}", new_account))
}

fn list(list_cmd: ListAccounts) -> Result<String, String> {
Expand All @@ -103,7 +103,7 @@ fn list(list_cmd: ListAccounts) -> Result<String, String> {
let acc_provider = AccountProvider::new(secret_store, AccountProviderSettings::default());
let accounts = acc_provider.accounts().map_err(|e| format!("{}", e))?;
let result = accounts.into_iter()
.map(|a| format!("0x{:?}", a))
.map(|a| format!("0x{:x}", a))
.collect::<Vec<String>>()
.join("\n");

Expand Down

0 comments on commit 06c94ce

Please sign in to comment.