Description
require_positive_amount(e, amount) panics with "amount must be positive". The message does not include the actual invalid amount, making debugging harder.
What to fix
pub fn require_positive_amount(amount: i128) {
if amount <= 0 {
panic!("InvalidAmount: amount must be positive, got {}", amount);
}
}
Update any tests that match on the old message string.
Files touched
src/validation.rs
- Any test files matching the old panic string
PR requirement
Closes #[issue_id] — Timeframe: 24 hours
Description
require_positive_amount(e, amount)panics with"amount must be positive". The message does not include the actual invalid amount, making debugging harder.What to fix
Update any tests that match on the old message string.
Files touched
src/validation.rsPR requirement
Closes #[issue_id]— Timeframe: 24 hours