feat(deposit-panel): add chain parity
This commit is contained in:
parent
5dccf1c050
commit
6982d45bfd
|
@ -5,15 +5,15 @@ import { useState } from 'react'
|
|||
import { useSelector } from 'react-redux'
|
||||
|
||||
import PanelWrapper from './PanelWrapper'
|
||||
import { RootState } from '../../../../../redux/store'
|
||||
import ConnectedWallet from '../../../../../components/General/ConnectedWallet'
|
||||
import ConnectWallet from '../../../../../components/General/ConnectWallet'
|
||||
import { RootState } from '../../../../../redux/store'
|
||||
import ChainParity from '../../../../ValidatorOnboarding/Deposit/ChainParity'
|
||||
|
||||
const DepositPanel = () => {
|
||||
const [isInfoBoxVisible, setIsInfoBoxVisible] = useState(true)
|
||||
const { isWalletConnected, isTransactionConfirmation } = useSelector(
|
||||
(state: RootState) => state.deposit,
|
||||
)
|
||||
const { isWalletConnected, isTransactionConfirmation, isChainParity } =
|
||||
useSelector((state: RootState) => state.deposit)
|
||||
|
||||
const onCloseInfoBox = () => {
|
||||
setIsInfoBoxVisible(false)
|
||||
|
@ -24,35 +24,39 @@ const DepositPanel = () => {
|
|||
<Text size={19} weight={'semibold'}>
|
||||
Deposit Funds
|
||||
</Text>
|
||||
<YStack
|
||||
space={'$3'}
|
||||
style={{
|
||||
alignItems: 'center',
|
||||
textAlign: 'center',
|
||||
marginBottom: '6px',
|
||||
}}
|
||||
>
|
||||
{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} />}
|
||||
/>
|
||||
)}
|
||||
{!isTransactionConfirmation && (
|
||||
<YStack space={'$3'} style={{ width: '100%' }}>
|
||||
<Text size={19} weight={'semibold'}>
|
||||
Connect Wallet
|
||||
</Text>
|
||||
{isWalletConnected ? (
|
||||
<ConnectedWallet />
|
||||
) : (
|
||||
<ConnectWallet isConnectBtnJustifyEnd={true} />
|
||||
)}
|
||||
</YStack>
|
||||
)}
|
||||
</YStack>
|
||||
{isChainParity ? (
|
||||
<ChainParity />
|
||||
) : (
|
||||
<YStack
|
||||
space={'$3'}
|
||||
style={{
|
||||
alignItems: 'center',
|
||||
textAlign: 'center',
|
||||
marginBottom: '6px',
|
||||
}}
|
||||
>
|
||||
{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} />}
|
||||
/>
|
||||
)}
|
||||
{!isTransactionConfirmation && (
|
||||
<YStack space={'$3'} style={{ width: '100%' }}>
|
||||
<Text size={19} weight={'semibold'}>
|
||||
Connect Wallet
|
||||
</Text>
|
||||
{isWalletConnected ? (
|
||||
<ConnectedWallet />
|
||||
) : (
|
||||
<ConnectWallet isConnectBtnJustifyEnd={true} />
|
||||
)}
|
||||
</YStack>
|
||||
)}
|
||||
</YStack>
|
||||
)}
|
||||
</PanelWrapper>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue