Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

replace Web3() by Web3(provider) #406

Closed
wants to merge 1 commit into from

Conversation

fireblockdev
Copy link

@fireblockdev fireblockdev commented Apr 9, 2019

The Web3() syntax is not valid anymore for the web3js project owner. To upgrade web3js to a recent version (> beta 37), it is an operation needed. However, this is not sufficient.

Other changes:

  • Web3.utils.toWei to Web3Utils.toWei (with the package web3-utils)
  • Web3.utils.BN to Web3Utils.BN
  • remove web3-providers-ws and replace by Web3.providers.WebsocketProvider

But after these changes, many unit tests doesn't work anymore

@fireblockdev fireblockdev mentioned this pull request Apr 9, 2019
@ellis2323
Copy link

With the new version web3js 1.0.52, it seems that we need to provide these options:

new Web3(provider, null, { transactionConfirmationBlocks: 1, transactionBlockTimeout: 5 });

@davidmurdoch
Copy link
Member

Thanks for the PR, @ellis2323. Since the next stable version of web3 will be 1.0.0-beta.37, and in the near future we'll be removing nearly all web3-dependent tests from our codebase, I'm going to go ahead and close this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants