Skip to content

Commit

Permalink
Invest: disable native currency balance check (#2137)
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovisser authored May 17, 2024
1 parent 1fe41c7 commit 28fb556
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions centrifuge-app/src/components/InvestRedeem/InvestForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ export function InvestForm({ autoFocus, investLabel = 'Invest' }: InvestFormProp
const formRef = React.useRef<HTMLFormElement>(null)
useFocusInvalidInput(form, formRef)

const nativeBalanceTooLow = state.nativeBalance.eq(0)

const inputAmountCoveredByCapacity = inputToDecimal(form.values.amount).lessThanOrEqualTo(state.capacity ?? 0)

const isPending =
Expand All @@ -109,11 +107,6 @@ export function InvestForm({ autoFocus, investLabel = 'Invest' }: InvestFormProp
<Stack gap={2}>
<EpochBusy busy={state.isPoolBusy} />
{state.statusMessage && <InlineFeedback>{state.statusMessage}</InlineFeedback>}
{nativeBalanceTooLow && (
<InlineFeedback>
{state.nativeCurrency && `${state.nativeCurrency.symbol} balance is too low.`}
</InlineFeedback>
)}
{!state.collectType || claimDismissed ? (
<>
<Field name="amount" validate={positiveNumber()}>
Expand Down Expand Up @@ -203,9 +196,7 @@ export function InvestForm({ autoFocus, investLabel = 'Invest' }: InvestFormProp
loading={isInvesting}
loadingMessage={loadingMessage}
disabled={
state.isPoolBusy ||
nativeBalanceTooLow ||
(state.poolCurrency?.symbol.toLowerCase().includes('lp') && hasPendingOrder)
state.isPoolBusy || (state.poolCurrency?.symbol.toLowerCase().includes('lp') && hasPendingOrder)
}
>
{investLabel}
Expand Down

0 comments on commit 28fb556

Please sign in to comment.