ArboreumDev / credit-union-frontend

Frontend in Next.js + Typescript + GraphQL
https://frontend-two-sandy.vercel.app
1 stars 0 forks source link

[WIP] Dju/risk input message #87

Closed djudjuu closed 4 years ago

djudjuu commented 4 years ago

compiles the info the risk module will need to run from the DB

output for a loanrequest with one supporter will look like this:

{
  "risk_assessment_context": {
    "central_risk_info": {
      "kumr_params": [
        4,
        5
      ],
      "beta_params": [
        5,
        2
      ]
    }
  },
  "optimizer_context": {
    "novation": false,
    "corpus_cash": 1400,
    "loans_in_corpus": [],
    "supporter_corpus_share": 0,
    "risk_free_interest_rate": 0.5
  },
  "loan_request_info": {
    "supporters": [
      {
        "recommendation_risk": {
          "kumr_params": [
            4,
            5
          ],
          "beta_params": [
            5,
            2
          ]
        },
        "trust_amount": 50,
        "supporter_id": "970dca39-f591-4ad4-b5fd-d1ba4fe55954"
      }
    ],
    "borrower_info": {
      "credit_score": 120.22,
      "income": 1400,
      "education_years": 3,
      "borrower_id": "370dca39-f591-4ad4-b5fd-d1ba4fe55954"
    },
    "amount": 100,
    "tenor": 6,
    "request_id": "b0cc4e47-cb97-4762-838a-6f2e45ecc903"
  }
}
vercel[bot] commented 4 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/arboreum/frontend/rhk7ybkwp
✅ Preview: https://frontend-git-dju-riskinputmessage.arboreum.vercel.app

gparuthi commented 4 years ago

Also, please fix the build errors before merging.

djudjuu commented 4 years ago

please fix the build errors before merging.

can you help me out here? screenshot_20200902_201740

djudjuu commented 4 years ago

Is the default risk params assigned to a new user? Who updates the default params?

every user starts out with the same recommendation risk. They get updated whenever a repayment is done...

gparuthi commented 4 years ago

please fix the build errors before merging.

can you help me out here? screenshot_20200902_201740

try running yarn?

gparuthi commented 4 years ago

In hindsight, the title of this PR and description could have been clearer. For e.g. "Generate inputs for swarmai"