Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: improve handling of missing data and simplify loan calculations #365

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MrRoudyk
Copy link
Contributor

This pull request includes changes to improve the handling of missing data and simplify the codebase across multiple files. The most important changes include updating the calculation of collateral and debt statistics to handle missing interest rate models and simplifying the processing of loan entities.

Improvements to handling missing data:

Codebase simplification:

  • apps/legacy_app/src/state.py: Simplified the set_loan_entities method by removing unnecessary JSON decoding and directly using the loan entity data.
  • apps/legacy_app/src/types.py: Simplified the compute_collateral_usd and compute_debt_usd methods by using the walrus operator to handle underlying addresses and checking their presence in prices. [1] [2]
  • apps/shared/loan_entity.py: Updated the compute_collateral_usd and compute_debt_usd methods to handle missing interest rate models by using default values and simplified the processing of collateral and debt items. [1] [2]

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