Fix/#1355 test helper to check balance difference (#1368)

* signing prefix added

* Minor improvement

* Tests changed

* Successfully tested

* Minor improvements

* Minor improvements

* Revert "Dangling commas are now required. (#1359)"

This reverts commit a6889776f4.

* fixex #1355

* linting

* suggested changes

* Update BreakInvariantBounty.test.js
This commit is contained in:
Aniket
2018-10-01 20:53:47 +05:30
committed by Nicolás Venturo
parent fa1dfbd113
commit 6ae041bca6
2 changed files with 13 additions and 6 deletions

View File

@ -0,0 +1,10 @@
async function balanceDifference (account, promise) {
const balanceBefore = web3.eth.getBalance(account);
await promise();
const balanceAfter = web3.eth.getBalance(account);
return balanceAfter.minus(balanceBefore);
}
module.exports = {
balanceDifference,
};