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

feat: unique invoice listeners for extensions #2250

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Conversation

dni
Copy link
Member

@dni dni commented Feb 9, 2024

changes the register_invoice_listener to use a non unique key so you its not possible to have a listeners running twice and throw a warning when trying to.

we should discourage use of get_current_extension_name its not needed, easy enough for the extension dev to pass the extension name or whatever he wants his listener to be named.

@talvasconcelos some extension still don't use a name, but they should! can you check that? also they should not use get_current_extension_name() anymore

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (5264677) 59.31% compared to head (0329616) 59.29%.

Files Patch % Lines
lnbits/tasks.py 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2250      +/-   ##
==========================================
- Coverage   59.31%   59.29%   -0.02%     
==========================================
  Files          60       60              
  Lines        9041     9044       +3     
==========================================
  Hits         5363     5363              
- Misses       3678     3681       +3     

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

@prusnak prusnak added this to the 0.12.1 milestone Feb 11, 2024
@motorina0 motorina0 marked this pull request as draft February 13, 2024 13:15
@motorina0 motorina0 removed this from the 0.12.2 milestone Feb 13, 2024
changes the `register_invoice_listener` to use a non unique key so you its not possible to have a listeners running twice and throw a warning when trying to.
@dni dni added this to the 0.12.2 milestone Feb 15, 2024
@dni dni marked this pull request as ready for review February 15, 2024 10:27
@motorina0 motorina0 merged commit 17b7826 into dev Feb 20, 2024
22 checks passed
@motorina0 motorina0 deleted the feat-unique-listeners branch February 20, 2024 12:03
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.

None yet

5 participants