Improve error messages for ERC721 and 1155 (#3254)

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
Kata
2022-05-27 02:52:43 +02:00
committed by GitHub
parent 61294a62af
commit 488dd562fb
8 changed files with 16 additions and 15 deletions

View File

@ -36,7 +36,7 @@ contract('ERC1155Burnable', function (accounts) {
it('unapproved accounts cannot burn the holder\'s tokens', async function () {
await expectRevert(
this.token.burn(holder, tokenIds[0], amounts[0].subn(1), { from: other }),
'ERC1155: caller is not owner nor approved',
'ERC1155: caller is not token owner nor approved',
);
});
});
@ -60,7 +60,7 @@ contract('ERC1155Burnable', function (accounts) {
it('unapproved accounts cannot burn the holder\'s tokens', async function () {
await expectRevert(
this.token.burnBatch(holder, tokenIds, [ amounts[0].subn(1), amounts[1].subn(2) ], { from: other }),
'ERC1155: caller is not owner nor approved',
'ERC1155: caller is not token owner nor approved',
);
});
});