Problem & Goal
Convert the arithmetic inside extend_milestone_deadline to checked operations that return a typed error, so no input can cause a wrap or an unhandled panic.
Context & Components
- Target Repository:
escrow-contract
- Module/Component:
extend_milestone_deadline (Extends the auto-release deadline of a milestone)
Implementation Details
- Review the existing codebase inside the
escrow-contract directory.
- Locate the source files relating to
extend_milestone_deadline.
- Implement the feature logic/validation rules step-by-step.
- Ensure code conforms to codebase patterns (lints, formats, types).
Verification & Testing Requirements
- Validation check: Assert i128::MAX and i128::MIN operands return Error::InvalidAmount rather than panicking, and that valid amounts produce identical results to before.
- Add comprehensive test cases matching these validation requirements.
- Ensure all other existing project tests continue to compile and pass.
Note: This issue is completely self-contained and does not block or require any other issues to be resolved.
Problem & Goal
Convert the arithmetic inside
extend_milestone_deadlineto checked operations that return a typed error, so no input can cause a wrap or an unhandled panic.Context & Components
escrow-contractextend_milestone_deadline(Extends the auto-release deadline of a milestone)Implementation Details
escrow-contractdirectory.extend_milestone_deadline.Verification & Testing Requirements
Note: This issue is completely self-contained and does not block or require any other issues to be resolved.