feat: align mint quote accounting with NUT-04#2119
Open
thesimplekid wants to merge 2 commits into
Open
Conversation
3 tasks
cdk-bot
reviewed
Jun 17, 2026
cdk-bot
left a comment
Collaborator
There was a problem hiding this comment.
Verified findings approved for disclosure:
- Missing Supabase migration for mint_quote.updated_at (high) - Existing Supabase wallet databases can fail mint quote insert/update paths after this PR because the application sends an
updated_atfield that the deployedmint_quotetable does not have, while startup compatibility checks still accept the old schema version.
Unanchored locations included in summary:- crates/cdk-supabase/src/wallet.rs:2570
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf37f626a0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Implement the mint quote accounting changes from cashubtc/nuts#377 by exposing amount_paid, amount_issued, and updated_at on mint quote responses. Keep the deprecated state field only for BOLT11 compatibility while deriving local quote state from the canonical counters for all mint methods. Persist updated_at in wallet quote storage so stale responses cannot move amount_paid or amount_issued backwards.
Add the Supabase mint_quote.updated_at migration and require schema version 8. Keep imported unpaid NpubCash quotes at updated_at 0 so legacy BOLT11 status responses can still advance them, and suppress stale websocket notifications after monotonic quote accounting rejects an update.
bf37f62 to
d5257c1
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2119 +/- ##
==========================================
+ Coverage 71.48% 71.53% +0.05%
==========================================
Files 356 356
Lines 73857 74154 +297
==========================================
+ Hits 52798 53049 +251
- Misses 21059 21105 +46 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Implement the mint quote accounting changes from cashubtc/nuts#377 by exposing amount_paid, amount_issued, and updated_at on mint quote responses.
Keep the deprecated state field only for BOLT11 compatibility while deriving local quote state from the canonical counters for all mint methods. Persist updated_at in wallet quote storage so stale responses cannot move amount_paid or amount_issued backwards.
Description
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just quick-checkbefore committingcrates/cdk-ffi)