From 21af6aa2f350c7b176cd1aa15214aaeb4056e9d3 Mon Sep 17 00:00:00 2001 From: lucas-manuel Date: Fri, 10 Nov 2023 11:20:03 -0500 Subject: [PATCH] fix: rm authority from constructor --- src/SparkLendFreezerMom.sol | 3 +-- test/SparkLendFreezerMom.t.sol | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/SparkLendFreezerMom.sol b/src/SparkLendFreezerMom.sol index edf49d1..89cb865 100644 --- a/src/SparkLendFreezerMom.sol +++ b/src/SparkLendFreezerMom.sol @@ -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); diff --git a/test/SparkLendFreezerMom.t.sol b/test/SparkLendFreezerMom.t.sol index 107d204..49875dc 100644 --- a/test/SparkLendFreezerMom.t.sol +++ b/test/SparkLendFreezerMom.t.sol @@ -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); } @@ -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)); }