Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0
Why this matters
In loan_manager/src/lib.rs refinance_loan, the check if loan.collateral_amount < new_amount { return Err(LoanError::InsufficientScore); } returns the wrong error variant. A dedicated InsufficientCollateral = 26 variant already exists in the LoanError enum but is unused here, so callers receive a misleading error and cannot distinguish a credit-score failure from a collateral shortfall.
Acceptance criteria
Files to touch
Out of scope
- Reworking refinance collateral ratio policy
- Adding new error variants
Why this matters
In loan_manager/src/lib.rs refinance_loan, the check if loan.collateral_amount < new_amount { return Err(LoanError::InsufficientScore); } returns the wrong error variant. A dedicated InsufficientCollateral = 26 variant already exists in the LoanError enum but is unused here, so callers receive a misleading error and cannot distinguish a credit-score failure from a collateral shortfall.
Acceptance criteria
Files to touch
Out of scope