diff --git a/src/components/loan_screen/LoanDetails.jsx b/src/components/loan_screen/LoanDetails.jsx index 2aac7f0..46ff716 100644 --- a/src/components/loan_screen/LoanDetails.jsx +++ b/src/components/loan_screen/LoanDetails.jsx @@ -10,10 +10,10 @@ export default function LoanDetails({step, handleStep, screens}) {

Loan Details

-

Loan Amount: ₦{step.details.selectedAmount}

-

Interest 3%: ₦{step.details.selectedAmount*0.03}

-

Mgt Fee 1%: ₦{step.details.selectedAmount*0.01}

-

Insurance 1%: ₦{step.details.selectedAmount*0.01}

+

Loan Amount: ₦{step.details.typedAmount}

+

Interest 3%: ₦{step.details.typedAmount*0.03}

+

Mgt Fee 1%: ₦{step.details.typedAmount*0.01}

+

Insurance 1%: ₦{step.details.typedAmount*0.01}

diff --git a/src/components/loan_screen/LoanPin.jsx b/src/components/loan_screen/LoanPin.jsx index 2b3c640..a2aa9d8 100644 --- a/src/components/loan_screen/LoanPin.jsx +++ b/src/components/loan_screen/LoanPin.jsx @@ -23,6 +23,12 @@ export default function LoanPin({step, handleStep, screens}) { if(!fields.pin){ throw ({message:'Please enter pin'}) } + // if(isNaN(fields.pin)){ + // throw ({message:'Amount must be a valid figure'}) + // } + if(fields.pin.length != 4){ + throw ({message:'Pin must be 4 digits'}) + } return verifyLoan(fields) }, onError: (error) => { @@ -39,7 +45,8 @@ export default function LoanPin({step, handleStep, screens}) { {!isSuccess ?
-
@@ -47,8 +54,8 @@ export default function LoanPin({step, handleStep, screens}) { :
-

Loan request has been accepted

-

You will get an sms with result shortly

+

Your loan is being disbursed. You will receive a confirmation SMS shortly.

+ {/*

You will get an sms with result shortly

*/}
} diff --git a/src/components/loan_screen/SelectedOffer.jsx b/src/components/loan_screen/SelectedOffer.jsx index bcfe342..f8d5b2f 100644 --- a/src/components/loan_screen/SelectedOffer.jsx +++ b/src/components/loan_screen/SelectedOffer.jsx @@ -38,7 +38,7 @@ export default function SelectedOffer({step, handleStep, screens}) { }, onSuccess: (res) => { // const selectedOffer = res.data.loan[0].loan - handleStep({loan_application_id:res.data.loan_application_id[0], ...step.details}, screens.loan_details) + handleStep({typedAmount: Number(amount),loan_application_id:res.data.loan_application_id[0], ...step.details}, screens.loan_details) } })