Skip to content

Commit

Permalink
fix: make two functions pausable
Browse files Browse the repository at this point in the history
  • Loading branch information
QEDK committed May 9, 2024
1 parent 2a31d11 commit b4d2d61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/StakedAvail.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ contract StakedAvail is
/// @notice Allows updater role to update assets based on staking rewards
/// @dev Negative delta decreases assets, positive delta increases assets
/// @param delta Amount to update assets by
function updateAssets(int256 delta) external onlyRole(UPDATER_ROLE) {
function updateAssets(int256 delta) external whenNotPaused onlyRole(UPDATER_ROLE) {
if (delta == 0) revert InvalidUpdate();
uint256 _assets;
if (delta < 0) {
Expand All @@ -111,7 +111,7 @@ contract StakedAvail is
/// @dev Decreases assets and supply based on amount and shares stored at time of exit
/// @param amount Amount of Avail withdrawn
/// @param shares Amount of staked Avail burned
function updateAssetsFromWithdrawals(uint256 amount, uint256 shares) external {
function updateAssetsFromWithdrawals(uint256 amount, uint256 shares) external whenNotPaused {
if (msg.sender != address(withdrawalHelper)) revert OnlyWithdrawalHelper();
uint256 _assets = assets - amount;
assets = _assets;
Expand Down

0 comments on commit b4d2d61

Please sign in to comment.