Why getAccounts return array? #556
KetulCodiste
announced in
Help
Replies: 1 comment 2 replies
-
Hey @KetulCodiste If you have a look at the JSON RPC API for EVM Blockchains, the function eth_accounts always returns an array of addresses. This same API has been impllemented by web3.js & ethers.js as you can check in their documentations. A similar question was asked in the ethereum stack exchange as well, which might help you understand the case of this API. Web3Auth directly returns the JSON RPC provider. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After I am connected using web3Auth, I can get the user wallet address using getAccounts which will return me the array of addresses and the 1st entry in the array will be my wallet address.
My doubt is, why it is returning me an array? As per my observation, it always returns one wallet address in the array. And as I am connected using my google account, this should always return me one wallet address. So, if the array has more than 1 entry, than what are the other entries?
Beta Was this translation helpful? Give feedback.
All reactions