feat(deposit-screens): use validator balance info box
This commit is contained in:
parent
c49c700692
commit
e45b9cf8b8
|
@ -1,7 +1,5 @@
|
|||
import { DividerLine, InformationBox, Text } from '@status-im/components'
|
||||
import { PlaceholderIcon } from '@status-im/icons'
|
||||
import { DividerLine, Text } from '@status-im/components'
|
||||
import { YStack } from 'tamagui'
|
||||
import { useState } from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
||||
import PanelWrapper from './PanelWrapper'
|
||||
|
@ -12,16 +10,12 @@ import ChainParity from '../../../../ValidatorOnboarding/Deposit/ChainParity'
|
|||
import ValidatorRequest from '../../../../ValidatorOnboarding/Deposit/ValidatorRequest/ValidatorRequest'
|
||||
import { getDepositTitle } from '../../../../../utilities'
|
||||
import DepositValidator from './DepositValidator'
|
||||
import ValidatorBalanceInfoBox from '../../../../ValidatorOnboarding/Deposit/ValidatorBalanceInfoBox'
|
||||
|
||||
const DepositPanel = () => {
|
||||
const [isInfoBoxVisible, setIsInfoBoxVisible] = useState(true)
|
||||
const { isWalletConnected, isTransactionConfirmation, isChainParity } =
|
||||
useSelector((state: RootState) => state.deposit)
|
||||
|
||||
const onCloseInfoBox = () => {
|
||||
setIsInfoBoxVisible(false)
|
||||
}
|
||||
|
||||
return (
|
||||
<PanelWrapper
|
||||
title={getDepositTitle({ isChainParity, isTransactionConfirmation })}
|
||||
|
@ -42,14 +36,7 @@ const DepositPanel = () => {
|
|||
name={'2'}
|
||||
isTransactionConfirmation={isTransactionConfirmation}
|
||||
/>
|
||||
{isInfoBoxVisible && !isTransactionConfirmation && (
|
||||
<InformationBox
|
||||
message="Your Validator balances currently require a deposit. If you have already made a deposit using Launchpad please wait until the transaction is posted on execution layer to continue."
|
||||
variant="error"
|
||||
onClosePress={onCloseInfoBox}
|
||||
icon={<PlaceholderIcon size={16} />}
|
||||
/>
|
||||
)}
|
||||
<ValidatorBalanceInfoBox />
|
||||
{!isTransactionConfirmation && (
|
||||
<YStack space={'$3'} style={{ width: '100%' }}>
|
||||
<Text size={19} weight={'semibold'}>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { DividerLine, InformationBox, Text } from '@status-im/components'
|
||||
import { PlaceholderIcon } from '@status-im/icons'
|
||||
import { DividerLine, Text } from '@status-im/components'
|
||||
import { YStack } from 'tamagui'
|
||||
import { useState } from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
@ -13,9 +12,9 @@ import { RootState } from '../../../redux/store'
|
|||
import { DEPOSIT_SUBTITLE } from '../../../constants'
|
||||
import { getDepositTitle } from '../../../utilities'
|
||||
import styles from './deposit.module.css'
|
||||
import ValidatorBalanceInfoBox from './ValidatorBalanceInfoBox'
|
||||
|
||||
const Deposit = () => {
|
||||
const [isInfoBoxVisible, setIsInfoBoxVisible] = useState(true)
|
||||
const [validatorCount, setValidatorCount] = useState(2)
|
||||
const { isWalletConnected, isTransactionConfirmation, isChainParity } =
|
||||
useSelector((state: RootState) => state.deposit)
|
||||
|
@ -27,10 +26,6 @@ const Deposit = () => {
|
|||
}
|
||||
}
|
||||
|
||||
const onCloseInfoBox = () => {
|
||||
setIsInfoBoxVisible(false)
|
||||
}
|
||||
|
||||
return (
|
||||
<YStack space={'$3'} className={styles['deposit-container']}>
|
||||
<Text size={19} weight={'semibold'}>
|
||||
|
@ -63,14 +58,7 @@ const Deposit = () => {
|
|||
isWithDivider={true}
|
||||
/>
|
||||
))}
|
||||
{isInfoBoxVisible && !isTransactionConfirmation && (
|
||||
<InformationBox
|
||||
message="Your Validator balances currently require a deposit. If you have already made a deposit using Launchpad please wait until the transaction is posted on execution layer to continue."
|
||||
variant="error"
|
||||
onClosePress={onCloseInfoBox}
|
||||
icon={<PlaceholderIcon size={16} />}
|
||||
/>
|
||||
)}
|
||||
<ValidatorBalanceInfoBox />
|
||||
{!isTransactionConfirmation && (
|
||||
<YStack space={'$3'} style={{ width: '100%' }}>
|
||||
<Text size={19} weight={'semibold'}>
|
||||
|
|
Loading…
Reference in New Issue