From 4e0e4bfbb34edb35de8375f8f59c22bb400abbfd Mon Sep 17 00:00:00 2001 From: ruslan zapevalov Date: Tue, 23 May 2023 22:55:52 +0400 Subject: [PATCH] add openzeppelin transfer util --- contracts/superclasses/Posts.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/superclasses/Posts.sol b/contracts/superclasses/Posts.sol index f4bffb7..44e5648 100644 --- a/contracts/superclasses/Posts.sol +++ b/contracts/superclasses/Posts.sol @@ -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"; @@ -304,7 +305,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(