Skip to content

Commit

Permalink
fix: revert rewards collection test change from different branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jparklev committed Sep 3, 2024
1 parent 2de22e7 commit 8fbebe0
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions contracts/test/PointTokenVault.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -614,16 +614,18 @@ contract PointTokenVaultTest is Test {
}

event FeeCollectorSet(address feeCollector);

function test_setFeeCollector() public {
vm.prank(admin);
vm.expectEmit(true,true,true,true);
vm.expectEmit(true, true, true, true);
emit FeeCollectorSet(toly);
pointTokenVault.setFeeCollector(toly);

vm.expectRevert(
abi.encodeWithSelector(
IAccessControl.AccessControlUnauthorizedAccount.selector, address(vitalik), pointTokenVault.DEFAULT_ADMIN_ROLE()
IAccessControl.AccessControlUnauthorizedAccount.selector,
address(vitalik),
pointTokenVault.DEFAULT_ADMIN_ROLE()
)
);
vm.prank(vitalik);
Expand Down Expand Up @@ -720,17 +722,6 @@ contract PointTokenVaultTest is Test {
vm.prank(toly);
pointTokenVault.redeemRewards(PointTokenVault.Claim(eigenPointsId, 1.8e18, 1.8e18, empty), toly);

// Unset redemption
vm.prank(operator);
pointTokenVault.setRedemption(eigenPointsId, ERC20(address(0)), 0, false);

vm.expectRevert(PointTokenVault.RewardsNotLive.selector);
pointTokenVault.collectFees(eigenPointsId);

// Set redemption again
vm.prank(operator);
pointTokenVault.setRedemption(eigenPointsId, rewardToken, 2e18, false);

// Collect fees
vm.expectEmit(true, true, true, true);
emit FeesCollected(eigenPointsId, pointTokenVault.feeCollector(), 0.1e18, 0.09e18);
Expand Down

0 comments on commit 8fbebe0

Please sign in to comment.