Replies: 1 comment 3 replies
-
Your problem is you don’t have an injected provider in your Safari; you would have the same problem in Chrome if you did not have MetaMask installed. You will likely need more logic throughout your app, but at a high level, you can imagine using something like: Basically, you need to find a different source for blockchain data if the user doesn’t have a plugin installed. You will likely need messaging around anything that requires a signer indicating to configure WalletConnect or install MetaMask too. If the page is only read-only and designed as a dashboard, you may wish to just use the default provider and not pull from MetaMask, since if the MM is connected to another network, you may get the wrong result. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Ethers Version
^5.6.8
Search Terms
No response
Describe the Problem
I want to via ethers to get totalsupply in contract, it work fine on Chrome, but it can't work on Safari and Firefox
Code Snippet
Contract ABI
No response
Errors
Error: missing provider (argument="provider", value=undefined, code=INVALID_ARGUMENT, version=providers/5.6.8)
Environment
Browser (Chrome, Safari, etc), React Native/Expo/JavaScriptCore
Environment (Other)
No response
Beta Was this translation helpful? Give feedback.
All reactions