Wallet not connected
button.onclick = async () => {
if (typeof window.ethereum !== 'undefined') {
try {
const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' });
walletText.innerText = "Connected: " + accounts[0];
} catch (err) {
walletText.innerText = "Connection rejected";
}
} else {
walletText.innerText = "MetaMask not installed";
}
};
