I'm trying to get all the connected addresses from metamask to my dApp. I know I CAN'T get any non-connected address to my dapp, but now that I've connected 3 of them, when I do provider.listAccounts() it just returns 1
1 Answer
As per the Metamask Documentation :
The eth_request_requestAccounts rpc returns :
Returns a Promise that resolves to an array of a single Ethereum address string.
If I'm not wrong, the address returned is the user selected address, not to be confused with a list of connected addresses.
This is a design choice of Metamask to secure users.