From aab291d72145141adf5a433eb080be246d1ba20e Mon Sep 17 00:00:00 2001 From: sophian Date: Fri, 9 Aug 2024 11:44:56 -0400 Subject: [PATCH] Fix layout of external repay --- .../src/pages/Loan/ExternalRepayForm.tsx | 92 +++++++++---------- 1 file changed, 43 insertions(+), 49 deletions(-) diff --git a/centrifuge-app/src/pages/Loan/ExternalRepayForm.tsx b/centrifuge-app/src/pages/Loan/ExternalRepayForm.tsx index add29d3d1..ff8db916a 100644 --- a/centrifuge-app/src/pages/Loan/ExternalRepayForm.tsx +++ b/centrifuge-app/src/pages/Loan/ExternalRepayForm.tsx @@ -183,55 +183,49 @@ export function ExternalRepayForm({ loan, destination }: { loan: ExternalLoan; d - - { - if (Dec(val || 0).gt(maxQuantity.toDecimal())) { - return `Quantity exeeds max (${maxQuantity.toString()})` - } - return '' - })} - name="quantity" - > - {({ field, form }: FieldProps) => { - return ( - form.setFieldValue('quantity', value)} - placeholder="0" - onSetMax={() => - form.setFieldValue('quantity', loan.pricing.outstandingQuantity.toDecimal().toNumber()) - } - /> - ) - }} - - - - - {({ field, form }: FieldProps) => { - return ( - form.setFieldValue('price', value)} - decimals={8} - /> - ) - }} - - - - - + { + if (Dec(val || 0).gt(maxQuantity.toDecimal())) { + return `Quantity exeeds max (${maxQuantity.toString()})` + } + return '' + })} + name="quantity" + > + {({ field, form }: FieldProps) => { + return ( + form.setFieldValue('quantity', value)} + placeholder="0" + onSetMax={() => + form.setFieldValue('quantity', loan.pricing.outstandingQuantity.toDecimal().toNumber()) + } + /> + ) + }} + + + {({ field, form }: FieldProps) => { + return ( + form.setFieldValue('price', value)} + decimals={8} + currency={displayCurrency} + /> + ) + }} + + + + + = {formatBalance(principal, displayCurrency, 2)} principal +