diff --git a/src/views/Lending/Cooler/positions/CreateOrRepayLoan.tsx b/src/views/Lending/Cooler/positions/CreateOrRepayLoan.tsx index 2baacd7662..56f6f0fe95 100644 --- a/src/views/Lending/Cooler/positions/CreateOrRepayLoan.tsx +++ b/src/views/Lending/Cooler/positions/CreateOrRepayLoan.tsx @@ -57,7 +57,7 @@ export const CreateOrRepayLoan = ({ const repayLoan = useRepayLoan(); const maturityDate = loan ? new Date(Number(loan.expiry.toString()) * 1000) : new Date(); - maturityDate.setDate(maturityDate.getDate() + Number(duration || 0)); + !loan && maturityDate.setDate(maturityDate.getDate() + Number(duration || 0)); const [paymentAmount, setPaymentAmount] = useState(new DecimalBigNumber("0")); const [collateralAmount, setCollateralAmount] = useState(new DecimalBigNumber("0"));