feat: implement minimum invoice amount from protocol config with test…#508
Merged
Baskarayelu merged 5 commits intoQuickLendX:mainfrom Feb 26, 2026
Merged
Conversation
…protocol_limits - update_protocol_limits was calling set_protocol_limits with only 5 args instead of required 7 - Now retrieves current limits and passes existing min_bid_amount and min_bid_bps values - Also removed unused imports from settlement.rs
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 Minimum Invoice Amount from Protocol Config
Summary
Implements minimum invoice amount validation from protocol config in store_invoice and
upload_invoice. Invoices below the configured minimum are rejected with InvalidAmount error.
Changes
Core Implementation
protocol_limits::ProtocolLimitsContract::validate_invoice()
amount < limits.min_invoice_amount
Tests
Added 6 new test cases:
Documentation
flow, admin configuration, and security considerations
Bug Fixes
Configuration
Security
Testing
Requirements Met
Notes
Closes #484