Skip to content

Commit

Permalink
test: handle testTransferFromWithApprovalFuzz with sender = address(t…
Browse files Browse the repository at this point in the history
…his) (#6)
  • Loading branch information
ChefMist authored Mar 25, 2024
1 parent b402267 commit 7dbd664
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/VaultToken.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ contract VaultTokenTest is Test {

if (mintAmount == type(uint256).max) {
assertEq(token.allowance(sender, address(this), currency), type(uint256).max);
} else if (sender == address(this)) {
/// if sender === address(this), transferFrom will not consume allowance
assertEq(token.allowance(sender, address(this), currency), mintAmount);
} else {
assertEq(token.allowance(sender, address(this), currency), mintAmount - transferAmount);
}
Expand Down

0 comments on commit 7dbd664

Please sign in to comment.