File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,9 @@ contract Ownable is Context {
19
19
* @dev Initializes the contract setting the deployer as the initial owner.
20
20
*/
21
21
constructor () internal {
22
- _owner = _msgSender ();
23
- emit OwnershipTransferred (address (0 ), _owner);
22
+ address msgSender = _msgSender ();
23
+ _owner = msgSender;
24
+ emit OwnershipTransferred (address (0 ), msgSender);
24
25
}
25
26
26
27
/**
Original file line number Diff line number Diff line change @@ -18,8 +18,9 @@ contract Secondary is Context {
18
18
* @dev Sets the primary account to the one that is creating the Secondary contract.
19
19
*/
20
20
constructor () internal {
21
- _primary = _msgSender ();
22
- emit PrimaryTransferred (_primary);
21
+ address msgSender = _msgSender ();
22
+ _primary = msgSender;
23
+ emit PrimaryTransferred (msgSender);
23
24
}
24
25
25
26
/**
@@ -44,6 +45,6 @@ contract Secondary is Context {
44
45
function transferPrimary (address recipient ) public onlyPrimary {
45
46
require (recipient != address (0 ), "Secondary: new primary is the zero address " );
46
47
_primary = recipient;
47
- emit PrimaryTransferred (_primary );
48
+ emit PrimaryTransferred (recipient );
48
49
}
49
50
}
You can’t perform that action at this time.
0 commit comments