upstream updates
This commit is contained in:
@@ -11,7 +11,7 @@ use silentdragonlitelib::{commands,
|
||||
#[macro_export]
|
||||
macro_rules! configure_clapapp {
|
||||
( $freshapp: expr ) => {
|
||||
$freshapp.version("1.0.0")
|
||||
$freshapp.version("1.3.2")
|
||||
.arg(Arg::with_name("dangerous")
|
||||
.long("dangerous")
|
||||
.help("Disable server TLS certificate verification. Use this if you're running a local lightwalletd with a self-signed certificate. WARNING: This is dangerous, don't use it with a server that is not your own.")
|
||||
@@ -25,6 +25,10 @@ macro_rules! configure_clapapp {
|
||||
.long("recover")
|
||||
.help("Attempt to recover the seed from the wallet")
|
||||
.takes_value(false))
|
||||
.arg(Arg::with_name("password")
|
||||
.long("password")
|
||||
.help("When recovering seed, specify a password for the encrypted wallet")
|
||||
.takes_value(true))
|
||||
.arg(Arg::with_name("seed")
|
||||
.short("s")
|
||||
.long("seed")
|
||||
@@ -232,7 +236,7 @@ pub fn command_loop(lightclient: Arc<LightClient>) -> (Sender<(String, Vec<Strin
|
||||
(command_tx, resp_rx)
|
||||
}
|
||||
|
||||
pub fn attempt_recover_seed() {
|
||||
pub fn attempt_recover_seed(password: Option<String>) {
|
||||
// Create a Light Client Config in an attempt to recover the file.
|
||||
let config = LightClientConfig {
|
||||
server: "0.0.0.0:0".parse().unwrap(),
|
||||
@@ -244,7 +248,7 @@ pub fn attempt_recover_seed() {
|
||||
data_dir: None,
|
||||
};
|
||||
|
||||
match LightClient::attempt_recover_seed(&config) {
|
||||
match LightClient::attempt_recover_seed(&config, password) {
|
||||
Ok(seed) => println!("Recovered seed: '{}'", seed),
|
||||
Err(e) => eprintln!("Failed to recover seed. Error: {}", e)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user