Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ settable via the matching env var):
- **Args**:
- `--order-id <UUID>`: Order identifier.
- `--invoice <STRING>`: Optional Lightning invoice.
- `--amount <u32>`: Fiat amount to buy.
- `--amount <u32>`: Fiat amount to pay (someone is selling sats, you are buying).
- **Handler**: `execute_take_order(order_id, Action::TakeSell, invoice, amount, ctx)` in `src/cli/take_order.rs`.

- **`takebuy`**
- **Description**: Take a buy order from a Mostro pubkey.
- **Args**:
- `--order-id <UUID>`: Order identifier.
- `--amount <u32>`: Fiat amount to sell.
- `--amount <u32>`: Fiat amount to receive (someone is buying sats, you are selling).
- **Handler**: `execute_take_order(order_id, Action::TakeBuy, &None, amount, ctx)` in `src/cli/take_order.rs`.

- **`addinvoice`**
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.89.0"
channel = "1.97.0"
profile = "minimal"
components = ["clippy", "rust-docs", "rustfmt"]
targets = ["wasm32-unknown-unknown"]
4 changes: 2 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ pub enum Commands {
/// Invoice string
#[arg(short, long)]
invoice: Option<String>,
/// Amount of fiat to buy
/// Amount of fiat to pay (someone is selling sats, you are buying)
#[arg(short, long)]
amount: Option<u32>,
},
Expand All @@ -167,7 +167,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<u32>,
},
Expand Down
6 changes: 3 additions & 3 deletions src/cli/take_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub async fn execute_take_order(
amount: Option<u32>,
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")),
Expand All @@ -80,8 +80,8 @@ pub async fn execute_take_order(
}
if let Some(amt) = amount {
table.add_row(create_emoji_field_row(
"💰 ",
"Amount (sats)",
"💵 ",
"Fiat Amount",
&amt.to_string(),
));
}
Expand Down