-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Issue #313: allow checking pending invoices #493
Issue #313: allow checking pending invoices #493
Conversation
With these options, we are able to return: 1) all invoices (this is the default); 2) pending invoices (paid False, out False); 3) paid invoices; 4) and unpaid invoices.
YES! Welcome and thank you. |
Thanks! Noticed that the checks are not passing. Will try to fix it. I only ran the |
From what I saw the tests are breaking because of the This new commit should work as mypy is also passing. |
Were you going to add the "mint tokens" part of issue #313 as well? This only displays the unpaid ones, right? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #493 +/- ##
==========================================
+ Coverage 67.89% 68.38% +0.49%
==========================================
Files 76 76
Lines 6815 6852 +37
==========================================
+ Hits 4627 4686 +59
+ Misses 2188 2166 -22 ☔ View full report in Codecov by Sentry. |
Yes, I just need more time to dive into the code and understand where and how to do it |
@callebtc added the mint token part |
Awesome PR thank you! I'd like to add one more nit please, could you change the default behavior to not check (remain offline) and replace the We'd like to keep the client more offline by default, in case the user just wants to see the invoice requests and not check their state for example. |
The default will be false, i.e., if the user does not pass in the --mint flag, it will not try to mint the pending invoice.
Make sense! Is this it what you meant? |
Thank you, this looks great! I see a bunch of changes in unrelated files. I'm trying to understand why our IDEs seem to have different formatting preferences but this discrepancy doesn't seem to cause a black error in the ruff formatter. Do you have any idea? |
Good question. I'm not sure. I have the Black Formatter extension installed in my vscode, and only these formatters regarding python: "[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.codeActionsOnSave": {
"source.unusedImports": "explicit"
}
}, Probably something related to this |
🫡 |
datetime.utcfromtimestamp
in thecashu/wallet/cli/cli.py
file;invoices
CLI command:--only-paid
(-op
): retrieve only paid invoices;--only-unpaid
(-ou
): retrieve only unpaid invoices;--pending
(-p
): retrieve only pending invoices.Pending invoice was defined as invoices with
paid = False
andout = False
(not sure if this is right).Closes #313 .