From 5b5b569fd6e650b6038693ed994cad0743dae42f Mon Sep 17 00:00:00 2001 From: Sophia Date: Thu, 25 Jul 2024 11:40:34 -0400 Subject: [PATCH] Fix transfer debt for assets without maturity (#2316) * Fix transfer debt for assets without maturity * Clean up --- centrifuge-app/src/pages/Loan/TransferDebtForm.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/centrifuge-app/src/pages/Loan/TransferDebtForm.tsx b/centrifuge-app/src/pages/Loan/TransferDebtForm.tsx index c77e05ed67..11a7d6b66b 100644 --- a/centrifuge-app/src/pages/Loan/TransferDebtForm.tsx +++ b/centrifuge-app/src/pages/Loan/TransferDebtForm.tsx @@ -126,8 +126,7 @@ export function TransferDebtForm({ loan }: { loan: LoanType }) { return null } - const maturityDatePassed = - loan?.pricing && 'maturityDate' in loan.pricing && new Date() > new Date(loan.pricing.maturityDate) + const maturityDatePassed = loan.pricing.maturityDate && new Date() > new Date(loan.pricing.maturityDate) const selectedLoan = loans?.find((l) => l.id === form.values.targetLoan) as ActiveLoan | undefined function validate(financeAmount: Decimal) {