Skip to content

Add check_positive_money correctness function #2738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

nicolad
Copy link
Member

@nicolad nicolad commented Jun 26, 2025

Adds the check_positive_money helper to crates/model/src/types/money.rs and wires it into validate_instrument_common so max_notional / min_notional must be > 0.
Includes focused unit tests covering positive, zero, and negative values to guard correctness.

@nicolad nicolad requested a review from cjdsellers June 26, 2025 00:00
@nicolad nicolad self-assigned this Jun 26, 2025
@nicolad nicolad added the rust Relating to the Rust core label Jun 26, 2025
@cjdsellers cjdsellers changed the title Model: enforce positive Money via check_positive_money Add check_positive_money correctness function Jun 26, 2025
@cjdsellers cjdsellers merged commit 339f9e0 into develop Jun 26, 2025
13 checks passed
@cjdsellers cjdsellers deleted the 2630-check_positive_money branch June 26, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Relating to the Rust core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants