Need ethers.getCurrentProvider() #3867
KarthickSakthi
started this conversation in
Ideas
Replies: 1 comment
-
This is the sort of thing that belongs in a library higher up than Ethers; Ethers doesn't have a concept of current state, which is why you need to construct a provider yourself, explicitly. I have been planning to make a similar library though, although up until now have been relying on other libraries in the community, like wagmi and Web3Modal. It's been on the back of my mind. I'll move this to the Ideas discussion. :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the Feature
Getting Provider Dynamically via User Logged in or Connected his wallet via Metamask or Any wallets or WalletConnect.
Depend on the logging in of dapp via the wallets or WalletConnect. It's better to have a method ethers.getCurrentProvider().
This should return the provider. By that provider, Developers can get Signer for that Current provider easily.
For Metamask, we should write Seperatley and getting a provider! and For WalletConnect we need to write seperately.
By going with getCurrentProvider(), no need to worry about the user's currently connected Network and it's provider.
We can get the Provider Dynamically!
Code Example
No response
Beta Was this translation helpful? Give feedback.
All reactions