From 03bb754618f99351d56f5f972a62f0580292a8e8 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 1 May 2024 15:36:54 +0200 Subject: [PATCH] cli: fix clap bug with selecting indexer --- src/cli/opts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/opts.rs b/src/cli/opts.rs index f6ac872..1a7ad9a 100644 --- a/src/cli/opts.rs +++ b/src/cli/opts.rs @@ -46,6 +46,7 @@ pub const DEFAULT_ELECTRUM: &str = "example.com:50001"; pub const DEFAULT_ESPLORA: &str = "https://blockstream.info/testnet/api"; #[derive(Args, Clone, PartialEq, Eq, Debug)] +#[group(args = ["electrum", "esplora"], required = true)] pub struct ResolverOpt { /// Electrum server to use. #[arg( @@ -69,7 +70,6 @@ pub struct ResolverOpt { default_missing_value = DEFAULT_ESPLORA, num_args = 0..=1, require_equals = true, - required_unless_present = "electrum", env = "ESPLORA_SERVER", value_hint = ValueHint::Url, value_name = "URL"