Unverified Commit b6e51879 by Hadrien Croubois Committed by GitHub

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>
parent 1e8cb4b4
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
* `ERC20Permit`: added an implementation of the ERC20 permit extension for gasless token approvals. ([#2237](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2237)) * `ERC20Permit`: added an implementation of the ERC20 permit extension for gasless token approvals. ([#2237](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2237))
* Presets: added token presets with preminted fixed supply `ERC20PresetFixedSupply` and `ERC777PresetFixedSupply`. ([#2399](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2399)) * Presets: added token presets with preminted fixed supply `ERC20PresetFixedSupply` and `ERC777PresetFixedSupply`. ([#2399](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2399))
* `Address`: added `functionDelegateCall`, similar to the existing `functionCall`. ([#2333](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2333)) * `Address`: added `functionDelegateCall`, similar to the existing `functionCall`. ([#2333](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2333))
* `PaymentSplitter`: replace usage of `.transfer()` with `Address.sendValue` for improved compatibility with smart wallets. ([#2455](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2455))
* `UpgradeableProxy`: bubble revert reasons from initialization calls. ([#2454](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2454)) * `UpgradeableProxy`: bubble revert reasons from initialization calls. ([#2454](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2454))
## 3.3.0 (2020-11-26) ## 3.3.0 (2020-11-26)
......
...@@ -4,6 +4,7 @@ pragma solidity >=0.6.0 <0.8.0; ...@@ -4,6 +4,7 @@ pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol"; import "../GSN/Context.sol";
import "../math/SafeMath.sol"; import "../math/SafeMath.sol";
import "../utils/Address.sol";
/** /**
* @title PaymentSplitter * @title PaymentSplitter
...@@ -112,7 +113,7 @@ contract PaymentSplitter is Context { ...@@ -112,7 +113,7 @@ contract PaymentSplitter is Context {
_released[account] = _released[account].add(payment); _released[account] = _released[account].add(payment);
_totalReleased = _totalReleased.add(payment); _totalReleased = _totalReleased.add(payment);
account.transfer(payment); Address.sendValue(account, payment);
emit PaymentReleased(account, payment); emit PaymentReleased(account, payment);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment