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 commitpull/1474/heada6889776f4
. * fixex #1355 * linting * suggested changes * Update BreakInvariantBounty.test.js (cherry picked from commit6ae041bca6
)
parent
c25a1e366f
commit
b03932529c
@ -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, |
||||
}; |
Loading…
Reference in new issue