I am connecting to my wallet in metamask. I have the following code in my frontend code
const provider = new ethers.providers.Web3Provider(window.ethereum, "any")
await provider.send("eth_requestAccounts", [])
const signer = provider.getSigner()
const address = await signer.getAddress()
const balance = await signer.getBalance()
That works all great. So I can get the address of the wallet and I also get the balance, but I couldn't figure out how to get the token name like BTC, USDT, ...
I also couldn't find something useful in the official documentation for the provider https://docs.ethers.io/v3/api-providers.html
I hope someone can help me
but I couldn't figure out how to get the token name like BTC, USDT, ...
Because you don't.
You need to provide a token name - address mappings yourself, or ask from the user.