Migrate math tests to ethers.js v6 (#4769)

Co-authored-by: Ernesto García <ernestognw@gmail.com>
This commit is contained in:
Hadrien Croubois
2023-12-04 20:00:00 +01:00
committed by GitHub
parent ef699fa6a2
commit cffb2f1ddc
9 changed files with 366 additions and 441 deletions

View File

@ -70,7 +70,8 @@ contract('ERC721Consecutive', function (accounts) {
it('balance & voting power are set', async function () {
for (const account of accounts) {
const balance = sum(...batches.filter(({ receiver }) => receiver === account).map(({ amount }) => amount));
const balance =
sum(...batches.filter(({ receiver }) => receiver === account).map(({ amount }) => amount)) ?? 0;
expect(await this.token.balanceOf(account)).to.be.bignumber.equal(web3.utils.toBN(balance));