Remove "Remaining balance"
This commit is contained in:
parent
6c9145c5c6
commit
7683ebc0b8
|
@ -119,9 +119,6 @@ export function BuyAmountInput(props: {
|
||||||
? Math.min(amount ?? 0, MAX_LOAN_PER_CONTRACT - prevLoanAmount)
|
? Math.min(amount ?? 0, MAX_LOAN_PER_CONTRACT - prevLoanAmount)
|
||||||
: 0
|
: 0
|
||||||
|
|
||||||
const amountNetLoan = (amount ?? 0) - loanAmount
|
|
||||||
const remainingBalance = Math.max(0, (user?.balance ?? 0) - amountNetLoan)
|
|
||||||
|
|
||||||
const onAmountChange = (amount: number | undefined) => {
|
const onAmountChange = (amount: number | undefined) => {
|
||||||
onChange(amount)
|
onChange(amount)
|
||||||
|
|
||||||
|
@ -152,12 +149,6 @@ export function BuyAmountInput(props: {
|
||||||
>
|
>
|
||||||
{user && (
|
{user && (
|
||||||
<Col className="gap-3 text-sm">
|
<Col className="gap-3 text-sm">
|
||||||
<Row className="items-center justify-between gap-2 text-gray-500">
|
|
||||||
Remaining balance{' '}
|
|
||||||
<span className="text-neutral">
|
|
||||||
{formatMoney(Math.floor(remainingBalance))}
|
|
||||||
</span>
|
|
||||||
</Row>
|
|
||||||
{contractIdForLoan && (
|
{contractIdForLoan && (
|
||||||
<Row className="items-center justify-between gap-2 text-gray-500">
|
<Row className="items-center justify-between gap-2 text-gray-500">
|
||||||
<Row className="items-center gap-2">
|
<Row className="items-center gap-2">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user