Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

delete modifier onlyPendingGovernance #114

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions contracts/registries/YRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,13 @@ contract YRegistry {
pendingGovernance = _pendingGovernance;
}

function acceptGovernance() external onlyPendingGovernance {
governance = msg.sender;
function acceptGovernance() external {
require(msg.sender == pendingGovernance, "Only pendingGovernance can call this function.");
governance = pendingGovernance;
}

modifier onlyGovernance {
require(msg.sender == governance, "Only governance can call this function.");
_;
}
modifier onlyPendingGovernance {
require(msg.sender == pendingGovernance, "Only pendingGovernance can call this function.");
_;
}
}