You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
278 B
11 lines
278 B
6 years ago
|
async function balanceDifference (account, promiseFunc) {
|
||
6 years ago
|
const balanceBefore = web3.eth.getBalance(account);
|
||
6 years ago
|
await promiseFunc();
|
||
6 years ago
|
const balanceAfter = web3.eth.getBalance(account);
|
||
|
return balanceAfter.minus(balanceBefore);
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
balanceDifference,
|
||
|
};
|