feat: mint strict flag#37
Conversation
|
Warning Review limit reached
More reviews will be available in 43 minutes and 41 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds a nullable ChangesMintsStrict Payment Request Support
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly Related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@DotNut/Encoding/PaymentRequestBech32Encoder.cs`:
- Around line 289-291: The code in the switch case 0x09 currently sets
pr.MintsStrict = value.Length == 1 && value[0] == 0x01 which silently coerces
any malformed TLV to false; instead validate the TLV in the case 0x09 branch and
reject/raise an error when the value is not exactly one byte equal to 0x00 or
0x01; if value[0] == 0x00 set pr.MintsStrict = false, if 0x01 set it true,
otherwise throw/return a decode error (or propagate an existing TLV format
exception) so invalid external payloads fail fast.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6d9dff93-bde4-4c72-bf9f-c2f52da6fda3
📒 Files selected for processing (3)
DotNut/Encoding/PaymentRequestBech32Encoder.csDotNut/Encoding/PaymentRequestEncoder.csDotNut/NUT18/PaymentRequest.cs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
|
updated so it matches cashubtc/nuts#381 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@DotNut.Tests/Unit/Nut18Tests.cs`:
- Line 26: The comment in the Nut18Tests class contains a typo where it
references "NUT-26" but should reference "NUT-18" to be consistent with the test
class name and the PR objectives. Locate the comment that reads "Test vector
from NUT-26 PR `#381`" and correct "NUT-26" to "NUT-18".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8f3d36b0-64e7-40e9-bfef-9c1bb3977739
📒 Files selected for processing (4)
DotNut.Tests/Unit/Nut18Tests.csDotNut/Encoding/PaymentRequestBech32Encoder.csDotNut/Encoding/PaymentRequestEncoder.csDotNut/NUT18/PaymentRequest.cs
🚧 Files skipped from review as they are similar to previous changes (3)
- DotNut/NUT18/PaymentRequest.cs
- DotNut/Encoding/PaymentRequestEncoder.cs
- DotNut/Encoding/PaymentRequestBech32Encoder.cs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
cashubtc/nuts#380
Summary by CodeRabbit
MintsStrictfield to payment requests for stricter mints-related behavior.MintsStrictduring encoding/decoding.MintsStrict, rejecting improperly formatted values.MintsStrict,FeeReserve, andSupportedMethods.