Conversation
a1denvalu3
left a comment
There was a problem hiding this comment.
I think this should be called "Remove paid field in MintQuote" instead of "Deprecate" because it's already deprecated and we're removing it.
| {"secret": proof.secret}, | ||
| ) | ||
|
|
||
| async def store_mint_quote( |
There was a problem hiding this comment.
I don't think there even is a table for mint quotes in the AuthDB. I'm not sure why these functions are even here in the first place. They are not used throughout the codebase.
There was a problem hiding this comment.
the function has always existed, are you suggesting it's completely removed from this file ?
There was a problem hiding this comment.
I am suggesting that it has no purpose and shouldn't have existed in the first place. So why even bother fixing it.
|
There are some test failures. |
12e3190 to
0a00497
Compare
|
Rebased onto main. Tests still failing |
8e53fe8 to
975c383
Compare
cashu/mint/migrations.py
Outdated
| "WHERE witness IS NOT NULL AND LENGTH(witness) > 1024" | ||
| ) | ||
|
|
||
| async def m030_remove_paid_from_mint_quote(db: Database): |
There was a problem hiding this comment.
Is there a reason we don't just ALTER TABLE DROP COLUMN? They introduced that in SQLite version 3.35.0 back in March of 2021.
|
It seems only the postgres tests are failing in CI. I don't see where you are dropping the paid column for postgres, only if conn.type == "SQLITE" |
ece4354 to
4a98d57
Compare
callebtc
left a comment
There was a problem hiding this comment.
Could we also get the issued attribute out in this PR as well?
cashu/core/base.py
Outdated
| # Ensure default fallbacks for backwards compatibility | ||
| resp_state = getattr(mint_quote_resp, "state", None) or "unpaid" |
|
@callebtc What |
cdb545e to
8571a90
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #838 +/- ##
==========================================
- Coverage 50.02% 49.30% -0.73%
==========================================
Files 89 91 +2
Lines 10545 10655 +110
==========================================
- Hits 5275 5253 -22
- Misses 5270 5402 +132 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@callebtc - recent comments from last meeting addressed, cc @a1denvalu3 |
d6a9b84 to
f72ec34
Compare
cashu/core/base.py
Outdated
| # Ensure default fallbacks for backwards compatibility | ||
| if isinstance(mint_quote_resp, dict): | ||
| resp_state = mint_quote_resp.get("state", "unpaid") | ||
| expiry = mint_quote_resp.get("expiry", None) | ||
| pubkey = mint_quote_resp.get("pubkey", None) | ||
| else: | ||
| resp_state = mint_quote_resp.state if hasattr(mint_quote_resp, "state") else "unpaid" | ||
| expiry = mint_quote_resp.expiry if hasattr(mint_quote_resp, "expiry") else None | ||
| pubkey = mint_quote_resp.pubkey if hasattr(mint_quote_resp, "pubkey") else None | ||
|
|
There was a problem hiding this comment.
please no hasattr, .get and isinstance
Fixes #717
Summary
This PR completes the deprecation and removal of the legacy paid boolean field in mint_quotes, fully migrating the system to rely on the state field as the single source of truth for quote payment status.
pytest -v.