clbrge / svelte-web3

web3.js library integration as a Svelte store
MIT License
138 stars 32 forks source link

[Bug]: Cant connect to metamask after latest major upgrade in web3js to `v4.x.y` #60

Closed begonaalvarezd closed 1 year ago

begonaalvarezd commented 1 year ago

web3js has recently released a major upgrade to v4.x.y and this library does not seem to be compatible anymore with that version. The latest version I seem to be able to get compatibility with is v1.3.4

If eg I try to connect to a chain with ID 1071 I get the following error coming from the web3js library added using the cdn (which points to latest).

s: Web3 validator found 1 error[s]: value "1071" at "/0" must pass "hex" validation

If needed I can provide a repository and a deployment url

Thank you very much 🌷

govi218 commented 1 year ago

I had this issue as well; found compatibility with web3@1.9.0 and had the exact same error with the latest version.

clbrge commented 1 year ago

I would need a testcase since It's probably not strictly related to svelte-web3 . chainId have been migrated to native BigInt which create all kind of incompatibilities.

Crelde commented 1 year ago

I have the same issue. I created a minimal testcase

Though its really just following the Installation instructions + basic usage in the readme.

@clbrge I hope you have a chance to have a look! :)

ps. @begonaalvarezd Nice to see somebody from IOTA here, hey from IOTA Heroes! :)