From 6982d45bfdc9fa39fe0959675db11ff9ea56bec5 Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Fri, 23 Feb 2024 08:47:14 +0200 Subject: [PATCH] feat(deposit-panel): add chain parity --- .../Panels/DepositPanel.tsx | 70 ++++++++++--------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/src/pages/ValidatorManagement/ManageValidator/RightManageSettings/Panels/DepositPanel.tsx b/src/pages/ValidatorManagement/ManageValidator/RightManageSettings/Panels/DepositPanel.tsx index 70ba3ad8..d93bcc22 100644 --- a/src/pages/ValidatorManagement/ManageValidator/RightManageSettings/Panels/DepositPanel.tsx +++ b/src/pages/ValidatorManagement/ManageValidator/RightManageSettings/Panels/DepositPanel.tsx @@ -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 = () => { Deposit Funds - - {isInfoBoxVisible && !isTransactionConfirmation && ( - } - /> - )} - {!isTransactionConfirmation && ( - - - Connect Wallet - - {isWalletConnected ? ( - - ) : ( - - )} - - )} - + {isChainParity ? ( + + ) : ( + + {isInfoBoxVisible && !isTransactionConfirmation && ( + } + /> + )} + {!isTransactionConfirmation && ( + + + Connect Wallet + + {isWalletConnected ? ( + + ) : ( + + )} + + )} + + )} ) }