Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dethos
Copy link
Contributor

@dethos dethos commented May 15, 2024

Addresses: #2054

The rationale for this change is explained in the issue's discussion: #2054 (comment)

Summary: The Bolt 11 spec says that an invoice, without the x tag field specified, should expire by default in 1 hour (3600 seconds). The bolt11 package used by lnbits does not implement this, setting the expiry to None when the tag field is absent. The current implemented fallback sets the expiration date to 1 month after the creation date, which is incompatible with the spec and creates the reported differences between lnbits and other tools that decode the same invoice.

@codecov
Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.75%. Comparing base (5114bd4) to head (9ea353c).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2506      +/-   ##
==========================================
+ Coverage   61.73%   61.75%   +0.01%     
==========================================
  Files          69       69              
  Lines        9696     9689       -7     
==========================================
- Hits         5986     5983       -3     
+ Misses       3710     3706       -4     

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

dni added a commit to lnbits/bolt11 that referenced this pull request May 16, 2024
dni added a commit to lnbits/bolt11 that referenced this pull request May 16, 2024
@dni dni self-assigned this May 16, 2024
@dni dni added the bug Something isn't working label May 16, 2024
@dni
Copy link
Member

dni commented May 16, 2024

closes #2054

@arcbtc arcbtc merged commit 7a6c364 into lnbits:dev May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants