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
I am trying to integrate Third Webs React SDK and I don't know where to get the signer and provider details from my signed in user. Here is an example from the third webs docs.
Any idea of what myProvider or mySigner would be?
import { ChainId, ThirdwebSDKProvider } from "@thirdweb-dev/react";
// This is the chainId your dApp will work on.
const activeChainId = ChainId.Mainnet;
function MyApp({ Component, pageProps }) {
// If you want to use any custom provider or signer, add it here.
const myProvider = ...;
const mySigner = ...;
return (
<ThirdwebSDKProvider
desiredChainId={activeChainId}
signer={mySigner}
provider={myProvider}
>
{/* Your App Goes Here */}
</ThirdwebSDKProvider>
);
}
export default MyApp;
I think I may only need the signer, but I am not sure if it is an derived object or just the signed in wallet address?
The text was updated successfully, but these errors were encountered:
The developer docs for thirdweb-dev/react should be fine to follow, even though its redwood. I belive you would do something like this in web/src/App.js.
import{ChainId,ThirdwebSDKProvider}from"@thirdweb-dev/react";import{Web3Provider}from"@ethersproject/providers";// This is the chainId your dApp will work on.constactiveChainId=ChainId.Mainnet;constApp=()=>{constmyProvider=newWeb3Provider(window.ethereum);constmySigner=walletProvider.getSigner(0)return(<FatalErrorBoundarypage={FatalErrorPage}><ThirdwebSDKProviderdesiredChainId={activeChainId}signer={mySigner}provider={myProvider}>
// Rest of the redwood app....
I am trying to integrate Third Webs React SDK and I don't know where to get the signer and provider details from my signed in user. Here is an example from the third webs docs.
Any idea of what myProvider or mySigner would be?
I think I may only need the signer, but I am not sure if it is an derived object or just the signed in wallet address?
The text was updated successfully, but these errors were encountered: