Feat implement loan repayment functionality#79
Merged
Josue19-08 merged 5 commits intoJun 23, 2026
Merged
Conversation
Align the final loan status variant with issue TrustUp-app#65 and architecture docs. Co-authored-by: Cursor <cursoragent@cursor.com>
…D event Replace LoanStatus::Paid assertions, rename affected test cases, and assert LOANRPD topic and payload in test_repay_loan_emits_event. Co-authored-by: Cursor <cursoragent@cursor.com>
Update README and AI_CONTEXT to reflect CreditLine repayment implementation and current project status. Co-authored-by: Cursor <cursoragent@cursor.com>
Update SC-09 completion notes and replace planned CreditLine architecture with the implemented API and repayment flow. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Loan repayment (
repay_loan) was already implemented onmain; this PR aligns the final loan status withLoanStatus::Repaidper the issue spec, strengthensLoanRepaidevent test coverage, and updates outdated project documentation.Issue
Closes #65
Type of Change
Changes Made
LoanStatus::PaidtoLoanStatus::Repaidin creditline-contractrepay_loanfull-repayment transition and all related teststest_repay_loan_emits_eventto assertLOANRPDtopic and payloadTesting
running 99 tests test result: ok. 95 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out; finished in 0.73s
Additional validation:
cargo fmt --all— passedcargo clippy -p creditline-contract -- -D warnings— failed due to pre-existing warnings in dependency crates (merchant-registry-contract,liquidity-pool-contract), not in creditline-contract changesChecklist