Skip to content

Commit

Permalink
fix: rm authority from constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-manuel committed Nov 10, 2023
1 parent 58dc680 commit 21af6aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/SparkLendFreezerMom.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ contract SparkLendFreezerMom is ISparkLendFreezerMom {
address public authority;
address public owner;

constructor(address poolConfigurator_, address pool_, address authority_) {
constructor(address poolConfigurator_, address pool_) {
poolConfigurator = poolConfigurator_;
pool = pool_;
authority = authority_;
owner = msg.sender;

emit SetOwner(address(0), msg.sender);
Expand Down
6 changes: 3 additions & 3 deletions test/SparkLendFreezerMom.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ contract SparkLendFreezerMomUnitTestBase is Test {
authority = new AuthorityMock();
configurator = address(new ConfiguratorMock());
pool = address(new PoolMock());
freezer = new SparkLendFreezerMom(configurator, pool, address(authority));
freezer = new SparkLendFreezerMom(configurator, pool);

freezer.setAuthority(address(authority));
freezer.setOwner(owner);
}

Expand All @@ -33,11 +34,10 @@ contract SparkLendFreezerMomUnitTestBase is Test {
contract ConstructorTests is SparkLendFreezerMomUnitTestBase {

function test_constructor() public {
freezer = new SparkLendFreezerMom(configurator, pool, address(authority));
freezer = new SparkLendFreezerMom(configurator, pool);

assertEq(freezer.poolConfigurator(), configurator);
assertEq(freezer.pool(), pool);
assertEq(freezer.authority(), address(authority));
assertEq(freezer.owner(), address(this));
}

Expand Down

0 comments on commit 21af6aa

Please sign in to comment.