diff --git a/src/cli.rs b/src/cli.rs index 54f7fd0..47fcd91 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -145,7 +145,7 @@ pub enum Commands { /// Invoice string #[arg(short, long)] invoice: Option, - /// Amount of fiat to buy + /// Amount of fiat to pay (someone is selling sats, you are buying) #[arg(short, long)] amount: Option, }, @@ -154,7 +154,7 @@ pub enum Commands { /// Order id #[arg(short, long)] order_id: Uuid, - /// Amount of fiat to sell + /// Amount of fiat to receive (someone is buying sats, you are selling) #[arg(short, long)] amount: Option, }, diff --git a/src/cli/take_order.rs b/src/cli/take_order.rs index e9f80bd..b6cca7d 100644 --- a/src/cli/take_order.rs +++ b/src/cli/take_order.rs @@ -59,7 +59,7 @@ pub async fn execute_take_order( amount: Option, ctx: &Context, ) -> Result<()> { - let action_name = match action { + let action_name = match &action { Action::TakeBuy => "take buy", Action::TakeSell => "take sell", _ => return Err(anyhow::anyhow!("Invalid action for take order")), @@ -79,9 +79,13 @@ pub async fn execute_take_order( table.add_row(create_emoji_field_row("⚡ ", "Invoice", inv)); } if let Some(amt) = amount { + let amount_label = match &action { + Action::TakeBuy | Action::TakeSell => "Fiat Amount", + _ => "Amount (sats)", + }; table.add_row(create_emoji_field_row( "💰 ", - "Amount (sats)", + amount_label, &amt.to_string(), )); }