Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for invoices without expiry tag #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dsbaars
Copy link

@dsbaars dsbaars commented Dec 6, 2024

The BOLT11 specification allows that invoices do not have an explicit expiry tag: https://github.com/lightning/bolts/blob/master/11-payment-encoding.md#tagged-fields

This pull request falls back to the specified default so depending methods do not return null.
Unfortunately I don't have a way to generate a bolt11 to test this, otherwise I would add it.

@dsbaars dsbaars force-pushed the feature/fix-no-expiry-tag branch from 1a8c242 to 0ae82ed Compare December 6, 2024 16:51
@dsbaars dsbaars force-pushed the feature/fix-no-expiry-tag branch from 0ae82ed to 2894f97 Compare December 6, 2024 17:05
@jorijn
Copy link
Owner

jorijn commented Dec 6, 2024

Hi @dsbaars - thanks for your contribution, much appreciated. I'd like to keep the codebase fully covered by unit tests, so I can trust it's behavior between different PHP versions.

Would you be so kind to write a unit test to test this specific scenario?

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.

2 participants