From 4d22162385012efc7eb96f11a7ee712bf541082d Mon Sep 17 00:00:00 2001 From: benthecarman Date: Wed, 1 Oct 2025 07:56:14 +0200 Subject: [PATCH] refactor: require named arguments for CreateOffer CLI options Change all CreateOffer command arguments to use long-form flags (--amount, --description, --issuer, --expiry, --quantity) instead of positional arguments. This is needed otherwise you cannot for example create an offer with a quantity of Some(0), without having to specify all the other arguments because they were positional. --- src/cli.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 1d5b5f4..92b04ba 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -179,20 +179,20 @@ enum Commands { /// CreateOffer creates a BOLT 12 offer. CreateOffer { /// The amount of the offer in millisatoshis. - #[arg(required = false)] + #[arg(long, required = false)] amount: Option, /// The description of the offer. - #[arg(required = false)] + #[arg(long, required = false)] description: Option, /// The issuer of the offer. - #[arg(required = false)] + #[arg(long, required = false)] issuer: Option, /// Relative expiry of the offer in seconds. - #[arg(required = false)] + #[arg(long, required = false)] expiry: Option, /// The quantity of the offer. If 0, unbounded quantity is assumed. If None, /// quantity defaults to 1. - #[arg(required = false)] + #[arg(long, required = false)] quantity: Option, }, }