@@ -390,7 +390,7 @@ impl Configuration {
|
||||
|
||||
fn extra_data(&self) -> Result<Bytes, String> {
|
||||
match self.args.flag_extradata.as_ref().or(self.args.flag_extra_data.as_ref()) {
|
||||
Some(ref x) if x.len() <= 32 => Ok(x.as_bytes().to_owned()),
|
||||
Some(x) if x.len() <= 32 => Ok(x.as_bytes().to_owned()),
|
||||
None => Ok(version_data()),
|
||||
Some(_) => Err("Extra data must be at most 32 characters".into()),
|
||||
}
|
||||
|
||||
@@ -38,6 +38,6 @@ pub fn execute(cmd: ImportWallet) -> Result<String, String> {
|
||||
let acc_provider = AccountProvider::new(secret_store);
|
||||
let wallet = try!(PresaleWallet::open(cmd.wallet_path).map_err(|_| "Unable to open presale wallet."));
|
||||
let kp = try!(wallet.decrypt(&password).map_err(|_| "Invalid password."));
|
||||
let address = acc_provider.insert_account(kp.secret().clone(), &password).unwrap();
|
||||
let address = acc_provider.insert_account(*kp.secret(), &password).unwrap();
|
||||
Ok(format!("{:?}", address))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user