diff --git a/src/hub/PWNHub.sol b/src/hub/PWNHub.sol index e0261a8..ecf4601 100644 --- a/src/hub/PWNHub.sol +++ b/src/hub/PWNHub.sol @@ -34,8 +34,8 @@ contract PWNHub is Ownable { |* # CONSTRUCTOR *| |*----------------------------------------------------------*/ - constructor() Ownable() { - + constructor(address owner) Ownable() { + _transferOwnership(owner); } diff --git a/src/loan/type/PWNSimpleLoan.sol b/src/loan/type/PWNSimpleLoan.sol index cfd1c66..ba6fbcf 100644 --- a/src/loan/type/PWNSimpleLoan.sol +++ b/src/loan/type/PWNSimpleLoan.sol @@ -32,7 +32,7 @@ contract PWNSimpleLoan is PWNVault, IPWNLoanMetadataProvider { /** * @notice Struct defining a simple loan. - * @param status 0 == none/dead || 2 == running/accepted offer || 3 == paid back || 4 == expired. + * @param status 0 == none/dead || 2 == running/accepted offer/accepted request || 3 == paid back || 4 == expired. * @param borrower Address of a borrower. * @param expiration Unix timestamp (in seconds) setting up a default date. * @param lateRepaymentEnabled If true, a borrower can repay a loan even after an expiration date, but not after lender claims expired loan. diff --git a/test/helper/BaseIntegrationTest.t.sol b/test/helper/BaseIntegrationTest.t.sol index 5c14601..6cb0bd8 100644 --- a/test/helper/BaseIntegrationTest.t.sol +++ b/test/helper/BaseIntegrationTest.t.sol @@ -56,7 +56,7 @@ abstract contract BaseIntegrationTest is Test { abi.encodeWithSignature("initialize(address,uint16,address)", address(this), 0, feeCollector) ); config = PWNConfig(address(proxy)); - hub = new PWNHub(); + hub = new PWNHub(address(this)); loanToken = new PWNLOAN(address(hub)); simpleLoan = new PWNSimpleLoan(address(hub), address(loanToken), address(config)); diff --git a/test/unit/PWNHub.t.sol b/test/unit/PWNHub.t.sol index aa3bba6..91a5544 100644 --- a/test/unit/PWNHub.t.sol +++ b/test/unit/PWNHub.t.sol @@ -25,8 +25,7 @@ abstract contract PWNHubTest is Test { } function setUp() external { - vm.prank(owner); - hub = new PWNHub(); + hub = new PWNHub(owner); } @@ -48,8 +47,7 @@ contract PWNHub_Constructor_Test is PWNHubTest { function test_shouldSetHubOwner() external { address otherOwner = address(0x4321); - vm.prank(otherOwner); - hub = new PWNHub(); + hub = new PWNHub(otherOwner); assertTrue(hub.owner() == otherOwner); }