From 59158570713d194ddbd9cf89ece6528944538e14 Mon Sep 17 00:00:00 2001 From: JP Date: Sun, 1 Oct 2023 14:30:23 -0500 Subject: [PATCH] remove validation, update verbiage --- .../src/pages/Loan/ExternalFinanceForm.tsx | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/centrifuge-app/src/pages/Loan/ExternalFinanceForm.tsx b/centrifuge-app/src/pages/Loan/ExternalFinanceForm.tsx index f353e41435..5159aafd3f 100644 --- a/centrifuge-app/src/pages/Loan/ExternalFinanceForm.tsx +++ b/centrifuge-app/src/pages/Loan/ExternalFinanceForm.tsx @@ -184,7 +184,7 @@ export function ExternalFinanceForm({ loan }: { loan: ExternalLoan }) { - Total principal + Total amount {financeForm.values.price && !Number.isNaN(financeForm.values.price as number) ? formatBalance( @@ -209,7 +209,7 @@ export function ExternalFinanceForm({ loan }: { loan: ExternalLoan }) { - To repay the asset, enter face value and settlement price of the asset. + To repay the asset, enter face value and settlement price of the transaction. @@ -261,17 +261,7 @@ export function ExternalFinanceForm({ loan }: { loan: ExternalLoan }) { )}) is smaller than the outstanding balance.` : '' - }, - (val) => { - const num = val instanceof Decimal ? val.toNumber() : val - const repayAmount = Dec(num) - .mul(repayForm.values.faceValue || 1) - .div(loan.pricing.notional.toDecimal()) - - return repayAmount.gt(debt) ? 'Amount exceeds outstanding' : '' - }, - maxPriceVariance(loan.pricing) - )} + } name="price" > {({ field, meta, form }: FieldProps) => { @@ -292,7 +282,7 @@ export function ExternalFinanceForm({ loan }: { loan: ExternalLoan }) { - Total principal + Total amount {repayForm.values.price && !Number.isNaN(repayForm.values.price as number) ? formatBalance(