diff --git a/projects/TokenizeRWATemplate-frontend/src/components/Account.tsx b/projects/TokenizeRWATemplate-frontend/src/components/Account.tsx index 0e81154..d3a396e 100644 --- a/projects/TokenizeRWATemplate-frontend/src/components/Account.tsx +++ b/projects/TokenizeRWATemplate-frontend/src/components/Account.tsx @@ -1,4 +1,4 @@ -import { useMemo } from 'react' +import { useMemo, useState } from 'react' import { useUnifiedWallet } from '../hooks/useUnifiedWallet' import { ellipseAddress } from '../utils/ellipseAddress' import { getAlgodConfigFromViteEnvironment } from '../utils/network/getAlgoClientConfigs' @@ -18,6 +18,7 @@ import { getAlgodConfigFromViteEnvironment } from '../utils/network/getAlgoClien const Account = () => { const { activeAddress } = useUnifiedWallet() const algoConfig = getAlgodConfigFromViteEnvironment() + const [copied, setCopied] = useState(false) // Normalize network name for Lora const networkName = useMemo(() => { @@ -33,16 +34,42 @@ const Account = () => { const loraUrl = `https://lora.algokit.io/${networkName}/account/${address}/` + const handleCopy = async () => { + try { + await navigator.clipboard.writeText(address) + setCopied(true) + setTimeout(() => setCopied(false), 1500) + } catch (e) { + console.error('Failed to copy address', e) + } + } + return (
Mint standard ASAs or mint an NFT-style ASA on TestNet.
+ {/* TestNet funding helper */} +Send ALGO, USDC, or any ASA (including NFTs) to another wallet.
+ {/* TestNet USDC helper */} +