diff --git a/contracts/Rln.sol b/contracts/Rln.sol index bd97416..1d9daf8 100644 --- a/contracts/Rln.sol +++ b/contracts/Rln.sol @@ -85,7 +85,8 @@ contract RLN { members[_pubkeyIndex] = 0; // refund deposit - receiver.transfer(MEMBERSHIP_DEPOSIT); + (bool sent, _) = receiver.call{value: MEMBERSHIP_DEPOSIT}(""); + require(sent, "transfer failed"); emit MemberWithdrawn(pubkey, _pubkeyIndex); }