[BUG] LNbits >= 1.0: ISO 8601 time/expiry parsed as unix seconds, paid admissions never confirmed
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #943 来自 @chappie-daemon —— 已合并
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- typescript
调研方向
Start with LNbitsPaymentsProcessor.getInvoice() and trace how details.time and details.expiry become invoice dates. Check the processor’s unit tests for numeric and ISO 8601 responses; done means paid invoices confirm and expired invoices retire for both formats. The issue author says a fix and tests are ready and plans to open a pull request.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
With LNbits >= 1.0 as the payments processor, paid admissions are never confirmed and expired invoices stay pending forever.
LNbits 1.x returns details.time and details.expiry from GET /api/v1/payments/{payment_hash} as ISO 8601 strings (e.g. "2025-10-11T15:24:27+00:00"); LNbits 0.x returned unix seconds. LNbitsPaymentsProcessor still does new Date(data.details.time * 1000) / new Date(data.details.expiry * 1000), which yields Invalid Date for strings. As a result:
PaymentsService.confirmInvoice→InvoiceRepository.confirmInvoicecallsconfirmedAt.toISOString()→RangeError: Invalid time value, so a user who paid the admission invoice is not admitted (both from the/callbacks/lnbitswebhook and from the maintenance worker poll);isExpiredInvoice()is false for an invalidexpiresAt, so unpaid invoices that LNbits still knows are re-saved aspendingon every maintenance pass and never retired.
To Reproduce
- Run nostream with
payments.enabled: true,payments.processor: lnbitsagainst LNbits 1.x (seen with 1.5.6). - Request an admission invoice at
/invoicesand pay it. - The invoice is not confirmed and the pubkey is not admitted; unpaid invoices past their expiry remain
pendingin theinvoicestable.
Unit-level reproduction: feed invoiceResponse({ data: { paid: true }, details: { time: '2025-10-11T15:24:27+00:00' } }) to LNbitsPaymentsProcessor.getInvoice() — confirmedAt is Invalid Date.
Expected behavior
Dates from LNbits are parsed correctly whether they come as unix seconds (LNbits < 1.0) or ISO 8601 strings (LNbits >= 1.0); paid invoices get confirmed, expired ones get retired.
System
- OS: Ubuntu 22.04
- Platform: docker (compose)
- Version: nostream 3.4.1 (same code in 2.1.0 and current
main); LNbits 1.5.6
Logs
On 3.4.1 after the upgrade, 15 old unpaid invoices that LNbits still knows were re-saved as pending every minute; with the fix applied they were retired as expired on the next maintenance pass.
Additional context
I have a small fix with unit tests ready (accept both a number and an ISO string in the LNbits processor) and will open a PR referencing this issue.
- 主要语言
- TypeScript
- 星标
- 829
- 派生
- 234
- 平均合并
- 16 小时 57 分钟
- 30 天内合并 PR
- 76
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cameri/nostream 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
Website
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
Produce the relay peering launch film可能已有人在做 @Ferryx349 今天认领。 未关闭
cameri/nostream#942 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 28/100
维护者通常 1 天内回复
相似的 Issue
-
area: image-engine bug priority: low
难度 2/5 1-3 小时 新手友好度 88/100
snapotter-hq/SnapOtter#3885 ·
维护者通常 1 天内回复
-
Mend: dependency security vulnerability
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 3 天内回复
-
pending triage
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
bug P3 UI/UX
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
难度 2/5 1-3 小时 新手友好度 73/100
openclaw/openclaw#182077 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复