Added explicity pify dep, deprecating web3.eth. (#1532)
* Added explicity pify dep, deprecating web3.eth. * Dropped promisify in favor of pify.
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
const { ethGetBalance } = require('./web3');
|
||||
|
||||
async function balanceDifference (account, promiseFunc) {
|
||||
const balanceBefore = web3.eth.getBalance(account);
|
||||
const balanceBefore = await ethGetBalance(account);
|
||||
await promiseFunc();
|
||||
const balanceAfter = web3.eth.getBalance(account);
|
||||
const balanceAfter = await ethGetBalance(account);
|
||||
return balanceAfter.minus(balanceBefore);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user