• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 42373933224
78%

Build:
DEFAULT BRANCH: main
Ran 07 Nov 2026 12:50PM UTC
Jobs 2
Files 333
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Nov 2026 12:46PM UTC coverage: 77.58% (+0.008%) from 77.572%
42373933224

push

github

web-flow
fix(payments): accept LNbits 1.x callback bodies (#1067)

<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
## Problem

LNbits 1.x sends the payment object as a JSON string inside the webhook
body, effectively double-encoding it. The route used Express's default
strict JSON parser, which rejected the top-level string with `400`. Even
with an object body, the strict Zod schema rejected LNbits' extra
payment fields.

As a result, paid invoices were only confirmed by the maintenance poll
up to a minute later, while the invoice page still showed “waiting for
payment”.

## Fix

- `/callbacks/lnbits` now uses `json({ strict: false })`, accepting both
object and JSON-string bodies.
- The controller parses string bodies and returns `400 Malformed body`
for invalid JSON.
- The body schema is no longer strict; it validates `payment_hash` and
strips LNbits' extra fields.
- HMAC verification and invoice lookup from LNbits remain unchanged.

## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->
Closes - #1066 
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Non-functional change (docs, style, minor refactor)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking chang... (continued)

4890 of 6906 branches covered (70.81%)

Branch coverage included in aggregate %.

18 of 20 new or added lines in 3 files covered. (90.0%)

10664 of 13143 relevant lines covered (81.14%)

701.32 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
80.95
-0.87% src/routes/callbacks/index.ts
Jobs
ID Job ID Ran Files Coverage
1 Integration - 42373933224.1 07 Nov 2026 12:50PM UTC 333
31.61
GitHub Action Run
2 Unit - 42373933224.2 07 Nov 2026 12:50PM UTC 333
75.3
GitHub Action Run
Source Files on build 42373933224
  • Tree
  • List 333
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #42373933224
  • 705c323d on github
  • Prev Build on main (#42213341450)
  • Next Build on main (#42376005479)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc