-
Notifications
You must be signed in to change notification settings - Fork 1
feat: take invoice as positional arg in pay-invoice #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,13 +6,13 @@ export function registerPayInvoiceCommand(program: Command) { | |
| program | ||
| .command("pay-invoice") | ||
| .description("Pay a lightning invoice") | ||
| .requiredOption("-i, --invoice <bolt11>", "Invoice to pay") | ||
| .argument("<bolt11>", "Invoice to pay") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Description: Verify test file usage of pay-invoice command
# Check for old -i flag usage in test files
rg -n 'pay-invoice.*-i' --type=ts -g '*test*'Repository: getAlby/cli Length of output: 279 Fix failing tests for
`-c "${sender.nwcUrl}" pay-invoice "${invoiceResult.output.invoice}"`🤖 Prompt for AI Agents |
||
| .option("-a, --amount <sats>", "Amount (for zero-amount invoices)", parseInt) | ||
| .action(async (options) => { | ||
| .action(async (invoice, options) => { | ||
| await handleError(async () => { | ||
| const client = await getClient(program); | ||
| const result = await payInvoice(client, { | ||
| invoice: options.invoice, | ||
| invoice, | ||
| amount_in_sats: options.amount, | ||
| }); | ||
| output(result); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: getAlby/cli
Length of output: 120
🏁 Script executed:
Repository: getAlby/cli
Length of output: 156
🏁 Script executed:
Repository: getAlby/cli
Length of output: 3867
🏁 Script executed:
Repository: getAlby/cli
Length of output: 3135
Fix outdated
pay-invoicesyntax in CLI help text (src/index.ts)src/index.tsadvertisesnpx@getalby/clipay-invoice --invoice lnbc..., but thepay-invoicecommand is defined with a positional<bolt11>argument (no--invoiceoption). Update the example tonpx@getalby/clipay-invoice lnbc...to match both README and the actual CLI behavior.🤖 Prompt for AI Agents