You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Contracts] LoanManager approve_loan overrides the borrower-requested term with the default term #5
request_loan in loan_manager/src/lib.rs validates and stores term_ledgers: term from the borrower, but approve_loan overwrites it with let term_ledgers = Self::read_default_term(&env); and sets loan.term_ledgers = term_ledgers / due_date = sequence + term_ledgers. The borrower's requested and validated term is discarded, and min/max term limits checked elsewhere never bind the actual approved term.
Acceptance criteria
Approve using the loan's stored term_ledgers (or document why the default overrides it and enforce min/max term at request time accordingly)
Ensure min_term/max_term limits validated in request_loan actually govern the approved due_date
Add a test that requests a non-default term and asserts the approved loan's due_date reflects it
Update request_loan/approve_loan doc comments to match the real behavior
I have reviewed the issue and the surrounding code and I am confident I can deliver it. My approach is to keep the diff small, match the existing patterns in the repo, and include a test before opening the PR. I can have it up for review within 3 days.
Activity
david87131 commentedon Jun 18, 2026
I have reviewed the issue and the surrounding code and I am confident I can deliver it. My approach is to keep the diff small, match the existing patterns in the repo, and include a test before opening the PR. I can have it up for review within 3 days.
grantfox-oss commentedon Jun 18, 2026
🦊 GrantFox — @david87131 has been assigned to this issue as part of the Official Campaign campaign!
Next steps:
Closes #5)Good luck! Track your progress on GrantFox.
fix(contracts): approve_loan honours borrower-requested term
grantfox-oss commentedon Jun 20, 2026
🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign campaign!
@david87131's PR #34 was approved and merged by @ogazboiz.
🏆 @david87131: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (48 total points). Track your full progress on GrantFox.
👏 Great work, @david87131! Keep contributing to LabsCrypt.