import { Popover } from '@headlessui/react' import Image from 'next/image' import React, { useState } from 'react' import { toast } from 'react-toastify' import useTokenBalance from 'hooks/useTokenBalance' import useWalletStore from 'stores/useWalletStore' import { chain } from 'utils/chains' import { formatWalletAddress } from 'utils/formatters' import Button from 'components/Button' import ConnectModal from 'components/ConnectModal' const WalletPopover = ({ children }: { children: React.ReactNode }) => { const address = useWalletStore((s) => s.address) const actions = useWalletStore((s) => s.actions) const { data } = useTokenBalance() return ( {children}
token

{chain.stakeCurrency.coinDenom}{' '} {data?.toFixed(2)}

{address}

) } const Wallet = () => { const [showConnectModal, setShowConnectModal] = useState(false) const address = useWalletStore((s) => s.address) return ( <> {address ? ( {formatWalletAddress(address)} ) : ( )} setShowConnectModal(false)} /> ) } export default Wallet