Skip to content

Commit

Permalink
more detailed revert string (#244)
Browse files Browse the repository at this point in the history
Co-authored-by: Aodhgan <aodhgan@pooltogether.com>
  • Loading branch information
aodhgan and Aodhgan committed Oct 14, 2021
1 parent 6653c27 commit dc7abb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/Ticket.sol
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ contract Ticket is ControlledToken, ITicket {
) = TwabLib.decreaseBalance(
_account,
_amount.toUint208(),
"ERC20: burn amount exceeds balance",
"Ticket/twab-burn-lt-balance",
uint32(block.timestamp)
);

Expand Down
4 changes: 2 additions & 2 deletions test/Ticket.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ describe('Ticket', () => {

await expect(
ticket.transferTo(wallet1.address, wallet2.address, insufficientMintAmount),
).to.be.revertedWith('ERC20: burn amount exceeds balance');
).to.be.revertedWith('Ticket/twab-burn-lt-balance');
});
});

Expand Down Expand Up @@ -422,7 +422,7 @@ describe('Ticket', () => {
await ticket.mint(wallet2.address, mintAmount);

await expect(ticket.burn(wallet1.address, mintAmount)).to.be.revertedWith(
'ERC20: burn amount exceeds balance',
'Ticket/twab-burn-lt-balance',
);
});
});
Expand Down

0 comments on commit dc7abb8

Please sign in to comment.