feat: use is wallet connected redux

This commit is contained in:
RadoslavDimchev 2023-09-22 12:41:44 +03:00
parent 9b374fb4e2
commit 28288dc02c
1 changed files with 4 additions and 2 deletions

View File

@ -9,13 +9,15 @@ import ConnectWallet from './ConnectWallet'
import ConnectedWallet from './ConnectedWallet' import ConnectedWallet from './ConnectedWallet'
import DepositTitle from './DepositTitle' import DepositTitle from './DepositTitle'
import DepositSubtitle from './DepositSubtitle' import DepositSubtitle from './DepositSubtitle'
import { useSelector } from 'react-redux'
import { RootState } from '../../../redux/store'
const Deposit = () => { const Deposit = () => {
const [isInfoBoxVisible, setIsInfoBoxVisible] = useState(true) const [isInfoBoxVisible, setIsInfoBoxVisible] = useState(true)
const [validatorCount, setValidatorCount] = useState(0) const [validatorCount, setValidatorCount] = useState(0)
const { isWalletConnected } = useSelector((state: RootState) => state.deposit)
const validatorRequests = [1, 2] const validatorRequests = [1, 2]
const isConnectedWallet = false
const isTransactionConfirmation = false const isTransactionConfirmation = false
const addValidatorHandler = () => { const addValidatorHandler = () => {
@ -59,7 +61,7 @@ const Deposit = () => {
<Text size={19} weight={'semibold'}> <Text size={19} weight={'semibold'}>
Connect Wallet Connect Wallet
</Text> </Text>
{isConnectedWallet ? <ConnectedWallet /> : <ConnectWallet />} {isWalletConnected ? <ConnectedWallet /> : <ConnectWallet />}
</YStack> </YStack>
) )
} }