We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d091781 commit 1f85e12Copy full SHA for 1f85e12
contracts/governance/Governed.sol
@@ -51,16 +51,16 @@ contract Governed {
51
* This function must called by the pending governor.
52
*/
53
function acceptOwnership() external {
54
- address _pendingGovernor = pendingGovernor;
+ address oldPendingGovernor = pendingGovernor;
55
+
56
require(
- _pendingGovernor != address(0) && msg.sender == _pendingGovernor,
57
+ oldPendingGovernor != address(0) && msg.sender == oldPendingGovernor,
58
"Caller must be pending governor"
59
);
60
61
address oldGovernor = governor;
- address oldPendingGovernor = _pendingGovernor;
62
63
- governor = _pendingGovernor;
+ governor = oldPendingGovernor;
64
pendingGovernor = address(0);
65
66
emit NewOwnership(oldGovernor, governor);
0 commit comments