Skip to content

Commit

Permalink
Rename listorders options
Browse files Browse the repository at this point in the history
  • Loading branch information
grunch committed Mar 24, 2023
1 parent 4cbce4b commit 0026e10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ pub enum Commands {
/// Status of the order
#[arg(short, long)]
#[clap(default_value = "pending")]
order_status: Option<Status>,
status: Option<Status>,
/// Currency selected
#[arg(short, long)]
currency: Option<String>,
/// Choose an order kind
#[arg(value_enum)]
#[arg(short, long)]
kind_order: Option<Kind>,
kind: Option<Kind>,
},
/// Create a new buy/sell order on Mostro
Neworder {
Expand Down
13 changes: 5 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;

Expand All @@ -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?;
Expand Down

0 comments on commit 0026e10

Please sign in to comment.