mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-01-09 11:11:59 +00:00
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 { useSelector } from 'react-redux'
|
||||||
|
|
||||||
import PanelWrapper from './PanelWrapper'
|
import PanelWrapper from './PanelWrapper'
|
||||||
|
import { RootState } from '../../../../../redux/store'
|
||||||
import ConnectedWallet from '../../../../../components/General/ConnectedWallet'
|
import ConnectedWallet from '../../../../../components/General/ConnectedWallet'
|
||||||
import ConnectWallet from '../../../../../components/General/ConnectWallet'
|
import ConnectWallet from '../../../../../components/General/ConnectWallet'
|
||||||
import { RootState } from '../../../../../redux/store'
|
import ChainParity from '../../../../ValidatorOnboarding/Deposit/ChainParity'
|
||||||
|
|
||||||
const DepositPanel = () => {
|
const DepositPanel = () => {
|
||||||
const [isInfoBoxVisible, setIsInfoBoxVisible] = useState(true)
|
const [isInfoBoxVisible, setIsInfoBoxVisible] = useState(true)
|
||||||
const { isWalletConnected, isTransactionConfirmation } = useSelector(
|
const { isWalletConnected, isTransactionConfirmation, isChainParity } =
|
||||||
(state: RootState) => state.deposit,
|
useSelector((state: RootState) => state.deposit)
|
||||||
)
|
|
||||||
|
|
||||||
const onCloseInfoBox = () => {
|
const onCloseInfoBox = () => {
|
||||||
setIsInfoBoxVisible(false)
|
setIsInfoBoxVisible(false)
|
||||||
@ -24,35 +24,39 @@ const DepositPanel = () => {
|
|||||||
<Text size={19} weight={'semibold'}>
|
<Text size={19} weight={'semibold'}>
|
||||||
Deposit Funds
|
Deposit Funds
|
||||||
</Text>
|
</Text>
|
||||||
<YStack
|
{isChainParity ? (
|
||||||
space={'$3'}
|
<ChainParity />
|
||||||
style={{
|
) : (
|
||||||
alignItems: 'center',
|
<YStack
|
||||||
textAlign: 'center',
|
space={'$3'}
|
||||||
marginBottom: '6px',
|
style={{
|
||||||
}}
|
alignItems: 'center',
|
||||||
>
|
textAlign: 'center',
|
||||||
{isInfoBoxVisible && !isTransactionConfirmation && (
|
marginBottom: '6px',
|
||||||
<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"
|
{isInfoBoxVisible && !isTransactionConfirmation && (
|
||||||
onClosePress={onCloseInfoBox}
|
<InformationBox
|
||||||
icon={<PlaceholderIcon size={16} />}
|
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}
|
||||||
{!isTransactionConfirmation && (
|
icon={<PlaceholderIcon size={16} />}
|
||||||
<YStack space={'$3'} style={{ width: '100%' }}>
|
/>
|
||||||
<Text size={19} weight={'semibold'}>
|
)}
|
||||||
Connect Wallet
|
{!isTransactionConfirmation && (
|
||||||
</Text>
|
<YStack space={'$3'} style={{ width: '100%' }}>
|
||||||
{isWalletConnected ? (
|
<Text size={19} weight={'semibold'}>
|
||||||
<ConnectedWallet />
|
Connect Wallet
|
||||||
) : (
|
</Text>
|
||||||
<ConnectWallet isConnectBtnJustifyEnd={true} />
|
{isWalletConnected ? (
|
||||||
)}
|
<ConnectedWallet />
|
||||||
</YStack>
|
) : (
|
||||||
)}
|
<ConnectWallet isConnectBtnJustifyEnd={true} />
|
||||||
</YStack>
|
)}
|
||||||
|
</YStack>
|
||||||
|
)}
|
||||||
|
</YStack>
|
||||||
|
)}
|
||||||
</PanelWrapper>
|
</PanelWrapper>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user