Add a _spendAllowance function to ERC20 & ERC777 (#3170)
(cherry picked from commit c5a6cae898)
This commit is contained in:
committed by
Francisco Giordano
parent
234a971410
commit
494b1b9a39
@ -98,7 +98,7 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) {
|
||||
it('reverts', async function () {
|
||||
await this.token.approve(burner, allowance, { from: owner });
|
||||
await expectRevert(this.token.burnFrom(owner, allowance.addn(1), { from: burner }),
|
||||
'ERC20: burn amount exceeds allowance',
|
||||
'ERC20: insufficient allowance',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -59,7 +59,7 @@ contract('ERC20', function (accounts) {
|
||||
it('missing approval', async function () {
|
||||
await expectRevert(
|
||||
this.token.depositFor(initialHolder, initialSupply, { from: initialHolder }),
|
||||
'ERC20: transfer amount exceeds allowance',
|
||||
'ERC20: insufficient allowance',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user