Skip to content

Conversation

@npslaney
Copy link

Creates a simple, single payout method that handles all lightning address / invoice types

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a31268248f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +1196 to +1199
let requested_amount = match amount_msat {
Some(amt) if amt <= 0 => return Err(payout_error_to_napi(PayOutError::AmountZero)),
Some(amt) => {
let amt_u64 = u64::try_from(amt).map_err(|_| payout_error_to_napi(PayOutError::AmountTooLarge))?;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Ignore amount_msat for fixed instructions as documented

The new pay_out rejects any amount_msat <= 0 before parsing the instruction, but the public docstring explicitly says amount_msat is ignored for fixed-amount instructions. This means callers that pass 0 (e.g., a default numeric value from JS or a wrapper that always supplies a value) will get InvalidArg even for a fixed-amount Bolt11/Bolt12 instruction that should pay successfully. Consider deferring the <= 0 check until after parsing, and only enforcing it when the instruction requires a configurable amount.

Useful? React with 👍 / 👎.

@npslaney npslaney marked this pull request as draft January 16, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants