import { useTonConnect } from "@xircus-web3/ton-react" export default function Index() { const wallet = useTonConnect() if (wallet.status == "connected") { return ( <div> <div>{wallet.account}</div> <div>{wallet.balance}</div> <button onClick={wallet.disconnect}>Disconnect</button> </div> ) } return ( <div> <button onClick={wallet.connect}>Connect</button> </div> ) }
Last updated 8 months ago