From 0026e10bd48e222384afab0e10306fec74f868be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Calder=C3=B3n?= Date: Fri, 24 Mar 2023 18:20:50 -0300 Subject: [PATCH] Rename listorders options --- src/cli.rs | 4 ++-- src/main.rs | 13 +++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 75de3ec..9fa4027 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -86,14 +86,14 @@ pub enum Commands { /// Status of the order #[arg(short, long)] #[clap(default_value = "pending")] - order_status: Option, + status: Option, /// Currency selected #[arg(short, long)] currency: Option, /// Choose an order kind #[arg(value_enum)] #[arg(short, long)] - kind_order: Option, + kind: Option, }, /// Create a new buy/sell order on Mostro Neworder { diff --git a/src/main.rs b/src/main.rs index 0ffb599..0ac34a7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,9 +46,9 @@ async fn main() -> Result<()> { match &cli.command { Some(cli::Commands::ListOrders { - order_status, + status, currency, - kind_order, + kind, }) => { let mostro_key = XOnlyPublicKey::from_bech32(pubkey)?; @@ -61,17 +61,14 @@ async fn main() -> Result<()> { "Requesting orders from mostro pubId - {}", mostro_key.clone() ); - println!( - "You are searching {:?} orders", - order_status.unwrap().clone() - ); + println!("You are searching {:?} orders", status.unwrap().clone()); //Get orders from relays let table_of_orders = get_orders_list( mostro_key, - order_status.to_owned(), + status.to_owned(), upper_currency.clone(), - *kind_order, + *kind, &client, ) .await?;