feat: add support for route hints from private channels when creating invoices#3475
Open
pradip-1111 wants to merge 2 commits into
Open
feat: add support for route hints from private channels when creating invoices#3475pradip-1111 wants to merge 2 commits into
pradip-1111 wants to merge 2 commits into
Conversation
Contributor
📝 WalkthroughWalkthroughAdds an optional boolean flag Changes
Sequence Diagram(s)sequenceDiagram
participant UI as UI\n(ReceiveInvoice)
participant API as Client\nAPI (makeInvoice)
participant BG as Background\nAction (makeInvoice)
participant Conn as Connector\n(LNC / LND)
UI->>API: makeInvoice({ amount, memo, includePrivateChannels })
API->>BG: msg.request("makeInvoice", { amount, memo, includePrivateChannels })
BG->>Conn: connector.makeInvoice({ amount, memo, includePrivateChannels })
Conn->>Conn: includePrivateChannels -> map to payload.private
Conn->>Conn: call addInvoice / POST create invoice
Conn-->>BG: invoice response
BG-->>API: response
API-->>UI: invoice result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/app/screens/ReceiveInvoice/index.tsx`:
- Around line 80-87: The state update in setFormData unnecessarily spreads
formData twice; edit the update in ReceiveInvoice's handler so it only spreads
formData once (keep a single ...formData) before applying the dynamic key
[event.target.name] (handling checkbox via (event.target as
HTMLInputElement).checked or event.target.value.trim()) to eliminate the
redundant duplicate spread.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds opt-in support for including route hints from private channels when creating invoices.
Motivation:
Users with only private inbound liquidity (e.g. via LSPs) currently experience failed payments when invoices do not include route hints. This improves reliability and UX for such setups.
Changes:
includePrivateChannelsflag to MakeInvoiceArgsVerification:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.