mirror of
https://github.com/vacp2p/rln-contract.git
synced 2025-02-13 15:06:44 +00:00
Use call instead of transfer in case receiver fallback exceeds 2300 gas
This commit is contained in:
parent
d8c3d4e62f
commit
dc7778a24f
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user