Skip to content

Commit

Permalink
allow pause guardian or governor to call setDisabledOps
Browse files Browse the repository at this point in the history
  • Loading branch information
dglowinski committed Mar 20, 2024
1 parent cb033f3 commit 63f5ca6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/EVault/modules/Governance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ abstract contract GovernanceModule is IGovernance, Base, BalanceUtils, BorrowUti
_;
}

modifier pauseGuardianOnly() {
if (msg.sender != marketStorage.pauseGuardian) revert E_Unauthorized();
modifier governorOrPauseGuardianOnly() {
if (msg.sender != marketStorage.governorAdmin && msg.sender != marketStorage.pauseGuardian) {
revert E_Unauthorized();
}
_;
}

Expand Down Expand Up @@ -246,7 +248,7 @@ abstract contract GovernanceModule is IGovernance, Base, BalanceUtils, BorrowUti
}

/// @inheritdoc IGovernance
function setDisabledOps(uint32 newDisabledOps) public virtual nonReentrant pauseGuardianOnly {
function setDisabledOps(uint32 newDisabledOps) public virtual nonReentrant governorOrPauseGuardianOnly {
// market is updated because:
// if disabling interest accrual - the pending interest should be accrued
// if re-enabling interest - last updated timestamp needs to be reset to skip the disabled period
Expand Down

0 comments on commit 63f5ca6

Please sign in to comment.