Remove paid field in MeltQuote#1024
Open
KvngMikey wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Removes the deprecated paid boolean from melt quote storage/models/APIs and shifts behavior/tests to rely solely on state.
Changes:
- Dropped
paidfromPostMeltQuoteResponseand related API response construction paths. - Updated DB write paths and added a migration to remove the
paidcolumn frommelt_quotes. - Adjusted tests to assert on
stateinstead of deprecated boolean accessors/fields.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/mint/test_mint_api.py | Removes obsolete commented assertions around deprecated paid behavior. |
| tests/fuzz/test_fuzz_core.py | Updates fuzz assertions to use state comparisons instead of paid/unpaid/pending accessors. |
| cashu/wallet/v1_api.py | Stops including paid in melt quote request/response field selection. |
| cashu/mint/router.py | Removes paid from API response creation for melt quote retrieval. |
| cashu/mint/migrations.py | Adds migration to remove paid column from melt_quotes (SQLite table rebuild / Postgres DROP COLUMN). |
| cashu/mint/ledger.py | Replaces boolean paid checks with state comparisons. |
| cashu/mint/crud.py | Removes paid column from insert parameters for melt_quotes. |
| cashu/mint/auth/crud.py | Removes paid column usage in insert/update; stores state via .value. |
| cashu/core/models/melt_quote.py | Removes deprecated paid field from PostMeltQuoteResponse. |
| cashu/core/base.py | Removes backwards-compat mapping from legacy paid responses to state. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1024 +/- ##
==========================================
+ Coverage 75.03% 75.07% +0.04%
==========================================
Files 111 111
Lines 12239 12243 +4
==========================================
+ Hits 9183 9192 +9
+ Misses 3056 3051 -5 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up to #838
Fully Fixes #855
Supercedes #870
Summary
This PR completes the deprecation and removal of the legacy paid fields in melt_quotes, fully migrating the system to rely on the state field as the single source of truth for quote payment status.