0

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 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.