ArboreumDev / credit-union-frontend

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

Supporter can support more than 100% #178

Open gparuthi opened 3 years ago

gparuthi commented 3 years ago

Scenario:

{
    "users": [
      {
        "name": "a b",
        "email": "amitabh",
        "user_type": "borrower",
        "demographic_info": {
          "income": 300,
          "credit_score": 600,
          "education_years": 3
        }
      },
      {
        "name": "s k",
        "email": "salman",
        "user_type": "lender",
        "demographic_info": {}
      },
      {
        "name": "d p",
        "email": "deepika",
        "user_type": "lender",
        "demographic_info": {
          "income": 300,
          "credit_score": 600,
          "education_years": 3
        }
      }
    ],
    "actions": [
      {
        "id": 12,
        "action_type": "NEW_LOAN",
        "payload": {
          "amount": 50000,
          "loan_id": "312965e1-fba5-4301-b789-2b9d6cd6bd7b",
          "userEmail": "amitabh",
          "supporters": [
            {
              "email": "salman",
              "pledge_amount": 500000
            }
          ]
        }
      }
    ]
  }
gparuthi commented 3 years ago

Adding a check in dclient should fix this