Openzeppelin-contracts: Stop using syncronous HTTP requests

Created on 12 Jun 2018  路  4Comments  路  Source: OpenZeppelin/openzeppelin-contracts

馃帀 Description

  • [x] 馃悰 This is a bug report.
  • [x] 馃搱 This is a feature request.

It's kinda both.

馃摑 Details

Syncronous HTTP requests are deprecated in upcoming web3 version and provider-engine doesn't support them.
We use them in tests extensively, but it's mostly web3.eth.getBalance.
Let's remove them and be future-proof!

Most helpful comment

@LogvinovLeon I'm on it!

All 4 comments

@LogvinovLeon I'm on it!

I would love to move to async code but the problem is web3.js 0.x uses callbacks instead of promises. I wouldn't want the tests to be ridden with callbacks so we would have to promisify it somehow. @arun1595 keep that in mind!

@LogvinovLeon I've promisified the synchronous web3.eth.getBalance calls in the tests. Take a look at my PR when you get a chance.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fulldecent picture fulldecent  路  3Comments

bh2smith picture bh2smith  路  4Comments

Flash-Git picture Flash-Git  路  3Comments

sebastien-kr picture sebastien-kr  路  4Comments

sanchaymittal picture sanchaymittal  路  4Comments