Skip to content

Commit

Permalink
ensure the event emits amount in units of base
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhea committed Nov 14, 2023
1 parent 516c95a commit cdeedca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions contracts/src/internal/HyperdriveAdmin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract contract HyperdriveAdmin is HyperdriveBase {

/// @dev This function collects the governance fees accrued by the pool.
/// @param _options The options that configure how the fees are settled.
/// @return proceeds The amount of base collected.
/// @return proceeds The amount collected in units specified by _options.
function _collectGovernanceFee(
IHyperdrive.Options calldata _options
) internal nonReentrant returns (uint256 proceeds) {
Expand All @@ -42,7 +42,10 @@ abstract contract HyperdriveAdmin is HyperdriveBase {
uint256 governanceFeesAccrued = _governanceFeesAccrued;
delete _governanceFeesAccrued;
proceeds = _withdraw(governanceFeesAccrued, _options);
emit CollectGovernanceFee(_feeCollector, proceeds);
emit CollectGovernanceFee(
_feeCollector,
convertToBaseFromOption(proceeds, _pricePerShare(), _options)
);
}

/// @dev Allows an authorized address to pause this contract.
Expand Down

0 comments on commit cdeedca

Please sign in to comment.