Permission to only read Wallet Address

Viewed 411

I just want to collect the user's Wallet Address. I think these permission are too much. I don't need to see balance or initiate transactions. Just read-wallet-address.

What is the easiest and clean way to get the wallet address? This is the code I am using:

const provider = new ethers.providers.Web3Provider(window.ethereum)
await provider.send("eth_requestAccounts", []);
signer = provider.getSigner()
const walletAddress = await signer.getAddress()

See wallet balance, activity and initiate transactions

2 Answers
Related