Fix account list double 0x display (#8596)
* Remove unused self import * Fix account list double 0x display
This commit is contained in:
parent
cfd50538bb
commit
272ebc1ef7
@ -94,7 +94,7 @@ fn new(n: NewAccount) -> Result<String, String> {
|
|||||||
let secret_store = Box::new(secret_store(dir, Some(n.iterations))?);
|
let secret_store = Box::new(secret_store(dir, Some(n.iterations))?);
|
||||||
let acc_provider = AccountProvider::new(secret_store, AccountProviderSettings::default());
|
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))?;
|
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> {
|
fn list(list_cmd: ListAccounts) -> Result<String, String> {
|
||||||
@ -103,7 +103,7 @@ fn list(list_cmd: ListAccounts) -> Result<String, String> {
|
|||||||
let acc_provider = AccountProvider::new(secret_store, AccountProviderSettings::default());
|
let acc_provider = AccountProvider::new(secret_store, AccountProviderSettings::default());
|
||||||
let accounts = acc_provider.accounts().map_err(|e| format!("{}", e))?;
|
let accounts = acc_provider.accounts().map_err(|e| format!("{}", e))?;
|
||||||
let result = accounts.into_iter()
|
let result = accounts.into_iter()
|
||||||
.map(|a| format!("0x{:?}", a))
|
.map(|a| format!("0x{:x}", a))
|
||||||
.collect::<Vec<String>>()
|
.collect::<Vec<String>>()
|
||||||
.join("\n");
|
.join("\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user