Feature: ln address for buyers invoice - Step 1#59
Conversation
- Add Settings.ln_address (Option<String>, serde default) for backward-compatible loads - Document example in repository settings.toml template Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
WalkthroughThis PR adds user-facing Lightning address (LNURL-pay buyer address) management to the application. New configuration, state, validation, and UI handlers enable users to input, confirm, and persist a buyer Lightning address through dedicated settings menu options. ChangesLightning Address User Settings
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
I reviewed this PR carefully and I do not see a blocker here.
What I checked:
- backward-compatible settings deserialization when
ln_addressis missing - the User-mode-only Settings flow for set / confirm / clear
- validation behavior for
user@domain.comformat - paste handling for the new input popup
- Settings menu indexing so the new rows do not shift Admin-mode actions by mistake
- the current
AddInvoicepath, to make sure this persisted field fits the direction of the buyer invoice / LN address flow
The implementation looks coherent to me:
ln_addressdefaults to"", so legacy configs still load- the new rows are correctly user-only and admin option ordering stays intact
- save clears/trim logic is sensible for a first step
- no reachability check is added yet, which matches the PR scope
Checks are green too, so this looks good from my side. Nice incremental step toward buyer LN address support.
Summary
Adds persisted
ln_addressfor buyers (Lightning address /user@domain.com), keeps backward compatibility for configs that omit the field, and exposes User-mode-only Settings flows to set or clear it.Changes
Schema & template (
PR1)Settings.ln_address:Stringwith#[serde(default)]— missing key insettings.tomldeserializes to"".settings.toml: includesln_address = ""so new installs always have the key.legacy_settings_without_ln_address_deserializes_to_empty_stringchecks bothtoml::from_strand the sameconfig::Config→try_deserializepath used at runtime.Settings UI (
PR2, User mode only)ln_addresson disk.LightningAddress::from_str(user@domain.com). No LNURL reachability check yet (planned follow-up).Paste / UX
Docs / help
Backward compatibility
Existing
settings.tomlwithoutln_addressstill loads; treat “unset” assettings.ln_address.trim().is_empty().Out of scope / follow-ups
ln_exists-style).Summary by CodeRabbit
Release Notes