Skip to content

Commit

Permalink
move
Browse files Browse the repository at this point in the history
  • Loading branch information
aroralanuk committed Dec 12, 2024
1 parent c771cd9 commit a5c7234
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions solidity/contracts/isms/hook/AbstractMessageIdAuthorizedIsm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,6 @@ abstract contract AbstractMessageIdAuthorizedIsm is

// ============ Public Functions ============

/**
* @notice Release the value to the recipient if the message is verified.
* @param message Message to release value for.
*/
function _releaseValueToRecipient(bytes calldata message) internal {
bytes32 messageId = message.id();
uint256 _msgValue = verifiedMessages[messageId].clearBit(
VERIFIED_MASK_INDEX
);
if (_msgValue > 0) {
verifiedMessages[messageId] -= _msgValue;
payable(message.recipientAddress()).sendValue(_msgValue);
}
}

/**
* @notice Check if a message is verified through preVerifyMessage first.
* @param message Message to check.
Expand Down Expand Up @@ -138,6 +123,21 @@ abstract contract AbstractMessageIdAuthorizedIsm is

// ============ Internal Functions ============

/**
* @notice Release the value to the recipient if the message is verified.
* @param message Message to release value for.
*/
function _releaseValueToRecipient(bytes calldata message) internal {
bytes32 messageId = message.id();
uint256 _msgValue = verifiedMessages[messageId].clearBit(
VERIFIED_MASK_INDEX
);
if (_msgValue > 0) {
verifiedMessages[messageId] -= _msgValue;
payable(message.recipientAddress()).sendValue(_msgValue);
}
}

/**
* @notice Check if sender is authorized to message `preVerifyMessage`.
*/
Expand Down

0 comments on commit a5c7234

Please sign in to comment.