Use Address.sendValue for PaymentSplitter (#2456)

* use Address.sendValue instead of .transfer

* changelog entry

Co-authored-by: Hadrien Croubois <hadrien@openzeppelin.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
Hadrien Croubois
2021-01-07 17:03:20 +01:00
committed by GitHub
parent 1e8cb4b4a4
commit b6e5187973
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@ pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol";
import "../math/SafeMath.sol";
import "../utils/Address.sol";
/**
* @title PaymentSplitter
@ -112,7 +113,7 @@ contract PaymentSplitter is Context {
_released[account] = _released[account].add(payment);
_totalReleased = _totalReleased.add(payment);
account.transfer(payment);
Address.sendValue(account, payment);
emit PaymentReleased(account, payment);
}