Skip to content

Feat implement loan repayment functionality#79

Merged
Josue19-08 merged 5 commits into
TrustUp-app:mainfrom
BrayanMQ:feat-implement-loan-repayment-functionality
Jun 23, 2026
Merged

Feat implement loan repayment functionality#79
Josue19-08 merged 5 commits into
TrustUp-app:mainfrom
BrayanMQ:feat-implement-loan-repayment-functionality

Conversation

@BrayanMQ

Copy link
Copy Markdown
Contributor

Description

Loan repayment (repay_loan) was already implemented on main; this PR aligns the final loan status with LoanStatus::Repaid per the issue spec, strengthens LoanRepaid event test coverage, and updates outdated project documentation.

Issue

Closes #65

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changes Made

  • Renamed LoanStatus::Paid to LoanStatus::Repaid in creditline-contract
  • Updated repay_loan full-repayment transition and all related tests
  • Strengthened test_repay_loan_emits_event to assert LOANRPD topic and payload
  • Synced README, AI_CONTEXT, ROADMAP, and contracts.md with SC-09 completion

Testing

  • Tests pass locally
  • New tests added (if applicable):
  • cargo test -p creditline-contract:
    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 — passed
  • cargo 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 changes

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex code
  • Documentation updated
  • No new warnings generated

BrayanMQ and others added 5 commits June 20, 2026 12:41
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>
@Josue19-08
Josue19-08 merged commit 5efa118 into TrustUp-app:main Jun 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] SC-09: Implement loan repayment functionality

2 participants