Complexity / points: Trivial (100 points) - maintainer label: points-100-trivial
PR must include:
Problem
In contracts/invoice-escrow/src/lib.rs, the comment for get_escrow says it returns “escrow data for an invoice, or None if not found.â€^]
But the function signature is:
pub fn get_escrow(...) -> Result<EscrowData, Error>
- and it returns
Err(Error::EscrowNotFound) when missing
So the code behavior does not match the documented intent.
Proposed change
Fix the mismatch so documentation and behavior agree.
Acceptance criteria
Dependencies
Recommended after or together with [Docs] Add missing docs/API.md... so the new API doc and rustdoc stay consistent.
Complexity / points: Trivial (100 points) - maintainer label: points-100-trivial
PR must include:
Closes #21in the PR descriptionunwrap()in production Soroban contract paths (project convention)cargo testpasses locally; match CI (cargo fmt,cargo clippy -D warnings) when touching RustProblem
In
contracts/invoice-escrow/src/lib.rs, the comment forget_escrowsays it returns “escrow data for an invoice, or None if not found.â€^]But the function signature is:
pub fn get_escrow(...) -> Result<EscrowData, Error>Err(Error::EscrowNotFound)when missingSo the code behavior does not match the documented intent.
Proposed change
Fix the mismatch so documentation and behavior agree.
Acceptance criteria
get_escrowrustdoc comment to accurately reflectResult+Error::EscrowNotFounddocs/API.mdonce created) describe the same behaviorinvoice_idreturnsError::EscrowNotFoundDependencies
Recommended after or together with
[Docs] Add missing docs/API.md...so the new API doc and rustdoc stay consistent.