Skip to main content
deleted 25 characters in body
Source Link
Dawid
  • 141
  • 6

I think it stands to reason that Web3.givenProvider is no longer available in web3.js v4.x versions and window.ethereum should be used instead (see https://docs.web3js.org/guides/web3_providers_guide/#injected-providers). Since I followed web3.js v3.x documentation but am using web3.js v4, it might explain why Web3.givenProvider is null for me. But I'm wondering why the Web3.givenProvider variable isn't retained for backwards compatibility reasons?! Anyway, new Web3(window.ethereum); solves my current problem.

I think it stands to reason that Web3.givenProvider is no longer available in web3.js v4.x versions and window.ethereum should be used instead (see https://docs.web3js.org/guides/web3_providers_guide/#injected-providers). Since I followed web3.js v3.x documentation but am using web3.js v4, it might explain why Web3.givenProvider is null for me. But I'm wondering why the Web3.givenProvider variable isn't retained for backwards compatibility reasons?! Anyway, new Web3(window.ethereum); solves my current problem.

I think Web3.givenProvider is no longer available in web3.js v4.x versions and window.ethereum should be used instead (see https://docs.web3js.org/guides/web3_providers_guide/#injected-providers). Since I followed web3.js v3.x documentation but am using web3.js v4, it might explain why Web3.givenProvider is null for me. But I'm wondering why the Web3.givenProvider variable isn't retained for backwards compatibility reasons?! Anyway, new Web3(window.ethereum); solves my current problem.

deleted 1 character in body
Source Link
Dawid
  • 141
  • 6

I think it stands to reason that Web3.givenProvider is no longer available in web3.js v4.x versions and window.ethereum should be used instead (see https://docs.web3js.org/guides/web3_providers_guide/#injected-providers). Since I followed web3.js v3.x documentation but am using web3.js v4, it might explain why Web3.givenProvider is null for me. But I'm wondering why the Web3.givenProvider variable isn't retained for backwards compatibility reasons?!. Anyway, new Web3(window.ethereum); solves my current problem.

I think it stands to reason that Web3.givenProvider is no longer available in web3.js v4.x versions and window.ethereum should be used instead (see https://docs.web3js.org/guides/web3_providers_guide/#injected-providers). Since I followed web3.js v3.x documentation but am using web3.js v4, it might explain why Web3.givenProvider is null for me. But I'm wondering why the Web3.givenProvider variable isn't retained for backwards compatibility reasons?!. Anyway, new Web3(window.ethereum); solves my current problem.

I think it stands to reason that Web3.givenProvider is no longer available in web3.js v4.x versions and window.ethereum should be used instead (see https://docs.web3js.org/guides/web3_providers_guide/#injected-providers). Since I followed web3.js v3.x documentation but am using web3.js v4, it might explain why Web3.givenProvider is null for me. But I'm wondering why the Web3.givenProvider variable isn't retained for backwards compatibility reasons?! Anyway, new Web3(window.ethereum); solves my current problem.

Source Link
Dawid
  • 141
  • 6

I think it stands to reason that Web3.givenProvider is no longer available in web3.js v4.x versions and window.ethereum should be used instead (see https://docs.web3js.org/guides/web3_providers_guide/#injected-providers). Since I followed web3.js v3.x documentation but am using web3.js v4, it might explain why Web3.givenProvider is null for me. But I'm wondering why the Web3.givenProvider variable isn't retained for backwards compatibility reasons?!. Anyway, new Web3(window.ethereum); solves my current problem.