Replies: 1 comment 2 replies
-
Metmask now requires user to connect specific accounts to the dapp during first time, for privacy purposes. Ganache is pretty much a dev tool so it is allowing access to all the available accounts. window.ethereum.request({
method: "wallet_requestPermissions",
params: [
{
eth_accounts: {}
}
]
}); The above will trigger the metamask popup again and user can tick multiple accounts to give access to the dapp. |
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
-
Hello,
I am trying to configure ethers.js together with metamask.
Here is how I configure my provider:
I have Ganache running with a number of accounts. However, when I try to retrieve/list the accounts like so:
this.provider.listAccounts()
, I only get one element in the array...Note that I can see all accounts when I use the following configuration for my provider:
However, I need both metamask and the full list of accounts. What am I getting wrong? Do I need two separate providers? Note that metamask itself lists all Ganache accounts properly.
Can someone please help?
Beta Was this translation helpful? Give feedback.
All reactions