Skip to content

fix: intercept self hold payments based on invoice rather than payment hash#2027

Open
rolznz wants to merge 3 commits intomasterfrom
fix/self-payments-wrapped-invoice
Open

fix: intercept self hold payments based on invoice rather than payment hash#2027
rolznz wants to merge 3 commits intomasterfrom
fix/self-payments-wrapped-invoice

Conversation

@rolznz
Copy link
Contributor

@rolznz rolznz commented Jan 31, 2026

This PR also fixes a bug where we will fail saying the invoice has already been paid (I think would block wrapped invoices working with LND right now)

TODOs

  • undo expiry hack and regenerate invoices
  • test in sandbox locally (both wrapped and normal HOLD invoices)
  • test with LND (Polar - tested with JS SDK: chore: add example for wrapped invoices js-sdk#529)
  • test standard HOLD invoices with LDK (Mutinynet) NOTE: wrapped invoices are not supported yet by LDK-Node.
  • test keysend self-payments

Follow ups - move to new issue:

@rolznz rolznz added this to the v1.22.0 milestone Jan 31, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 31, 2026

Warning

Rate limit exceeded

@im-adithya has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 46 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 2174f02 and fd56016.

📒 Files selected for processing (6)
  • lnclient/lnd/lnd.go
  • tests/mock_ln_client.go
  • transactions/hold_invoice_self_payment_consumer.go
  • transactions/payments_test.go
  • transactions/self_hold_payments_test.go
  • transactions/transactions_service.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/self-payments-wrapped-invoice

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rolznz rolznz modified the milestones: v1.22.0, v1.21.5 Feb 10, 2026
@rolznz rolznz self-assigned this Feb 10, 2026
@rolznz
Copy link
Contributor Author

rolznz commented Feb 13, 2026

@im-adithya @frnandu in the latest version of Polar (LND v20) payments were failing until I set a timeout seconds (which should have been set anyway. I set it to 50s)

@rolznz rolznz requested review from frnandu and im-adithya February 13, 2026 10:02
@rolznz rolznz marked this pull request as ready for review February 13, 2026 10:02
@im-adithya
Copy link
Member

@coderabbitai full review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

✅ Actions performed

Full review triggered.

Copy link
Member

@im-adithya im-adithya left a comment

Choose a reason for hiding this comment

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

utACK

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