import { Block, Button, LabelLarge, MezoCircle, MonoLabelXSmall, ParagraphSmall, useStyletron, } from "@mezo-org/mezo-clay" import React, { useState } from "react" import { useCopyToClipboard } from "usehooks-ts" import { QRCodeSVG } from "qrcode.react" import NestedViewLayout from "../NestedViewLayout" import { getAddressExplorerUrl } from "../../../utils/address" import { usePassportContext } from "../../../hooks/usePassportContext" import { useWalletAccount } from "../../../hooks/useWalletAccount" function Receive() { const { environment } = usePassportContext() const walletAccount = useWalletAccount() const [, theme] = useStyletron() const [, copy] = useCopyToClipboard() const [isCopiedMessageVisible, setIsCopiedMessageVisible] = useState(false) const handleCopyAddress = () => { copy(walletAccount.accountAddress!) setIsCopiedMessageVisible(true) setTimeout(() => { setIsCopiedMessageVisible(false) }, 2000) } const blockExplorerUrl = getAddressExplorerUrl( walletAccount.accountAddress!, "mezo", environment === "testnet", ) return ( Your Mezo Address {walletAccount.networkFamily === "bitcoin" ? ( <> Mezo automatically created a smart account that's fully controlled by your connected Bitcoin wallet. Use this address to receive assets on Mezo. ) : ( <> Your connected wallet address is your Mezo address. Use this address to receive assets on Mezo. )} {walletAccount.accountAddress} ) } export default Receive