From 67a5317d3f793ec05ce04b2ee5a6bb438ccc25d0 Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Sat, 26 Sep 2020 21:30:14 +0200 Subject: [PATCH] disable birthday for import --- lib/src/commands.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/src/commands.rs b/lib/src/commands.rs index d313c7e..8c65a8a 100644 --- a/lib/src/commands.rs +++ b/lib/src/commands.rs @@ -668,15 +668,12 @@ impl Command for ImportCommand { } fn exec(&self, args: &[&str], lightclient: &LightClient) -> String { - if args.len() < 2 || args.len() > 3 { + if args.len() < 1 || args.len() > 2 { return format!("Insufficient arguments\n\n{}", self.help()); } let key = args[0]; - let birthday = match args[1].parse::() { - Ok(b) => b, - Err(_) => return format!("Couldn't parse {} as birthday. Please specify an integer. Ok to use '0'", args[1]), - }; + let rescan = if args.len() == 3 { if args[2] == "norescan" || args[2] == "false" || args[2] == "no" { @@ -688,7 +685,7 @@ impl Command for ImportCommand { true }; - let r = match lightclient.do_import_key(key.to_string(), birthday) { + let r = match lightclient.do_import_key(key.to_string(), 0) { Ok(r) => r.pretty(2), Err(e) => return format!("Error: {}", e), };