Skip to content

feat: implement can_renegotiate_loan function#30

Merged
jaykayudo merged 3 commits intomainfrom
unknown repository
Jun 10, 2025
Merged

feat: implement can_renegotiate_loan function#30
jaykayudo merged 3 commits intomainfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented May 29, 2025

Description

This PR implements the can_renegotiate_loan function as described in issue #29.
It determines whether a loan is eligible for renegotiation by ensuring that the loan is valid and active.

Type of Change

  • [ X ] New feature (non-breaking change which adds functionality)

Checklist

Development Best Practices

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing tests pass locally with my changes

Testing

  • Unit tests cover the new functionality
  • Integration tests verify the changes work with other components

Related Issues

Implement #29

Additional Context

The is_valid_loan(loan_id) check is currently commented out and will be uncommented once issue #23 s implemented.

0xat1 added 2 commits May 29, 2025 13:42
    - Update IOperations interface to include `can_renegotiate_loan`.
    - Add `can_renegotiate_loan` to prevent renegotiation on FORECLOSED or REPAID loans.
    - Add unit tests covering active, repaid, foreclosed, and invalid loan ID scenarios.
    - The `is_valid_loan` call is commented until the function is implemented in #23.
@ghost
Copy link
Author

ghost commented Jun 7, 2025

Hello. Since the is_valid_loan function has been implemented and merged, I’ve updated my branch to incorporate it into my code. The feature is now ready for review. Thanks!

@ghost ghost marked this pull request as ready for review June 7, 2025 17:33
Copy link
Contributor

@jaykayudo jaykayudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Job!

@jaykayudo jaykayudo merged commit b5da1ab into Trajectfi:main Jun 10, 2025
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.

1 participant