Skip to content

fix(nwc): expose hold settle deadline - #844

Open
frnandu wants to merge 1 commit into
feat/sample-app/cashu-restore-quotefrom
fix/nwc-settle-deadline-lookup
Open

frnandu wants to merge 1 commit into
feat/sample-app/cashu-restore-quotefrom
fix/nwc-settle-deadline-lookup

Conversation

@frnandu

@frnandu frnandu commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Invoice lookup responses now include an optional settlement deadline when one is provided.
  • Tests
    • Added coverage for settlement deadlines being present or absent in invoice lookup responses.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4bf6053b-b597-40b5-981a-770779f53967

📥 Commits

Reviewing files that changed from the base of the PR and between 26b1f37 and 681befe.

📒 Files selected for processing (2)
  • packages/ndk/lib/domain_layer/usecases/nwc/responses/lookup_invoice_response.dart
  • packages/ndk/test/usecases/nwc/lookup_invoice_response_test.dart

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

LookupInvoiceResponse now exposes an optional settleDeadline parsed from settle_deadline. Tests cover responses with and without that value.

Changes

Lookup invoice response

Layer / File(s) Summary
Parse and expose settlement deadline
packages/ndk/lib/domain_layer/usecases/nwc/responses/lookup_invoice_response.dart, packages/ndk/test/usecases/nwc/lookup_invoice_response_test.dart
LookupInvoiceResponse adds the optional settleDeadline field, reads it from settle_deadline, and includes it in toString(). Tests cover present and absent values.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 681be

The change adds an optional response field without changing behavior when it is absent. No concrete user-facing breakage is established, so no merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the change: exposing the hold settlement deadline in NWC invoice responses.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@frnandu
frnandu added this pull request to stack #832 September 21, 2026 18:23
@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.36%. Comparing base (26b1f37) to head (681befe).

Files with missing lines Patch % Lines
...secases/nwc/responses/lookup_invoice_response.dart 50.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (50.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@                           Coverage Diff                           @@
##           feat/sample-app/cashu-restore-quote     #844      +/-   ##
=======================================================================
+ Coverage                                72.24%   72.36%   +0.12%     
=======================================================================
  Files                                      261      261              
  Lines                                    16191    16192       +1     
=======================================================================
+ Hits                                     11697    11718      +21     
+ Misses                                    4494     4474      -20     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@frnandu
frnandu force-pushed the fix/nwc-settle-deadline-lookup branch from 647ee61 to 681befe Compare September 23, 2026 08:46

This branch has not been deployed

No deployments
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.

1 participant