Skip to content

Facing Web3Provider error #1515

Discussion options

You must be logged in to vote

@SamsShow, you need to use the provider that you got from others when creating a new Web3SignatureProvider, not the window. ethereum directly.

Example:

const   ethersProvider = new ethers.providers.Web3Provider(walletProvider);


 const web3SignatureProvider = new Web3SignatureProvider(
    ethersProvider!.provider
  );

In your case it would be

 const provider = new ethers.providers.Web3Provider(window.ethereum);
  await provider.send("eth_requestAccounts", []);
  
  const signer = provider.getSigner();
  
  // Fixed here
  this.signatureProvider = new Web3SignatureProvider(provider.provider);
  
  this.requestClient = new RequestNetwork({
    nodeConnectionConfig: {
      baseURL: 'https…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MantisClone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants