Remove hooks from ERC20 (#3838)

Co-authored-by: Francisco <frangio.1@gmail.com>
This commit is contained in:
JulissaDantes
2022-12-14 14:43:45 -05:00
committed by GitHub
parent e2d2ebc8fc
commit 3c80a42866
10 changed files with 121 additions and 150 deletions

View File

@ -158,8 +158,9 @@ function shouldBehaveLikeERC20 (errorPrefix, initialSupply, initialHolder, recip
});
it('reverts', async function () {
await expectRevert(this.token.transferFrom(
tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer to the zero address`,
await expectRevert(
this.token.transferFrom(tokenOwner, to, amount, { from: spender }),
`${errorPrefix}: transfer to the zero address`,
);
});
});
@ -240,14 +241,6 @@ function shouldBehaveLikeERC20Transfer (errorPrefix, from, to, balance, transfer
});
});
});
describe('when the recipient is the zero address', function () {
it('reverts', async function () {
await expectRevert(transfer.call(this, from, ZERO_ADDRESS, balance),
`${errorPrefix}: transfer to the zero address`,
);
});
});
}
function shouldBehaveLikeERC20Approve (errorPrefix, owner, spender, supply, approve) {