You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling getMainnetSdk it should be allowed to pass any ethers provider or signer. In our codebase we're using a custom useDapp-like library in conjunction with web3-react.
When no signer (e.g as injected by MetaMask) is available, it defaults to a StaticJsonRPCProvider.
This is very useful in combination with useSWR (or react-query) and suspense as it provides a great DX and UX:
It will actually show the data that only needs a provider and displays a fallback state if it can't fetch the data that needs a signer but will automatically show it when the user connects a wallet that injects a signer.
The text was updated successfully, but these errors were encountered:
This is probably a reasonable improvement. The only problem is that when a user passes a provider then the whole SDK is "read-only" and calling any method that would require a transaction will result in a runtime error.
When calling getMainnetSdk it should be allowed to pass any ethers provider or signer. In our codebase we're using a custom useDapp-like library in conjunction with web3-react.
When no signer (e.g as injected by MetaMask) is available, it defaults to a StaticJsonRPCProvider.
This is very useful in combination with useSWR (or react-query) and suspense as it provides a great DX and UX:
It will actually show the data that only needs a provider and displays a fallback state if it can't fetch the data that needs a signer but will automatically show it when the user connects a wallet that injects a signer.
The text was updated successfully, but these errors were encountered: