Skip to content

Commit

Permalink
Merge pull request #26 from BigWhaleLabs/add-OpenZeppelin-transfer-util
Browse files Browse the repository at this point in the history
add openzeppelin transfer util
  • Loading branch information
upacyxou authored May 23, 2023
2 parents aa441e6 + 4e0e4bf commit 0d8d185
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/superclasses/Posts.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
pragma solidity ^0.8.19;

import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "../models/PostAndParticipants.sol";
import "../models/Reaction.sol";
import "../models/PostRequest.sol";
Expand Down Expand Up @@ -348,7 +349,7 @@ contract Posts is KetlGuarded {
lastReactionIds[feedId][postId][commentId].increment();
// If ether was sent, transfer it to the author
if (msg.value > 0) {
payable(post.author).transfer(msg.value);
Address.sendValue(payable(post.author), msg.value);
}
// Emit the event
emit ReactionAdded(
Expand Down

0 comments on commit 0d8d185

Please sign in to comment.