Skip to content

Commit

Permalink
fix: hook getter
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Mar 20, 2024
1 parent 20b8885 commit dab9a75
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Auctions/Auction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ contract Auction is Governance, ReentrancyGuard {
virtual
returns (bool, bool, bool, bool)
{
Hook memory _hook;
Hook memory _hook = hook_;
return (_hook.kickable, _hook.kick, _hook.preTake, _hook.postTake);
}

Expand Down
7 changes: 7 additions & 0 deletions src/test/AuctionSwapper.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ contract AuctionSwapperTest is Setup {
assertEq(_to, address(asset));
assertEq(_kicked, 0);
assertEq(_available, 0);
assertEq(auction.hook(), address(swapper));
(bool hook1, bool hook2, bool hook3, bool hook4) = auction
.getHookFlags();
assertTrue(hook1);
assertTrue(hook2);
assertTrue(hook3);
assertTrue(hook4);

// Kicking it reverts
vm.expectRevert("nothing to kick");
Expand Down

0 comments on commit dab9a75

Please sign in to comment.