Promisify web3 sync requests in tests (#1009)

This commit is contained in:
Arun Kumar
2018-07-10 16:01:51 -05:00
committed by Matt Condon
parent 4575a240f7
commit 40b5594f52
26 changed files with 137 additions and 104 deletions

7
test/helpers/web3.js Normal file
View File

@ -0,0 +1,7 @@
const pify = require('pify');
const ethAsync = pify(web3.eth);
export const ethGetBalance = ethAsync.getBalance;
export const ethSendTransaction = ethAsync.sendTransaction;
export const ethGetBlock = ethAsync.getBlock;