Describe the bug
In src/handlers/request-handlers/root-request-handler.ts, the code unconditionally accesses settings.payments.feeSchedules:
fees: Object
.getOwnPropertyNames(settings.payments.feeSchedules) // ← TypeError if payments is undefined
When payments.enabled: false or the payments block is absent, this crashes the worker on any NIP-11 request.
To Reproduce
- Set
payments.enabled: false in settings.yaml
curl -H "Accept: application/nostr+json" http://localhost:8008/
- Worker crashes:
TypeError: Cannot read properties of undefined (reading 'feeSchedules')
Fix
fees: settings.payments
? Object.getOwnPropertyNames(settings.payments.feeSchedules).reduce(...)
: {},
System: Linux, Docker
Describe the bug
In
src/handlers/request-handlers/root-request-handler.ts, the code unconditionally accessessettings.payments.feeSchedules:When
payments.enabled: falseor thepaymentsblock is absent, this crashes the worker on any NIP-11 request.To Reproduce
payments.enabled: falseinsettings.yamlcurl -H "Accept: application/nostr+json" http://localhost:8008/TypeError: Cannot read properties of undefined (reading 'feeSchedules')Fix
System: Linux, Docker