fix: make SplitPayment payable by default

This commit is contained in:
Matt Condon
2017-11-24 17:02:53 +02:00
parent b7e7c765e0
commit 47585b1117
3 changed files with 10 additions and 15 deletions

View File

@ -4,7 +4,7 @@ import '../math/SafeMath.sol';
/**
* @title SplitPayment
* @dev Base contract that supports multiple payees claiming funds sent to this contract
* @dev Base contract that supports multiple payees claiming funds sent to this contract
* according to the proportion they own.
*/
contract SplitPayment {
@ -20,7 +20,7 @@ contract SplitPayment {
/**
* @dev Constructor
*/
function SplitPayment(address[] _payees, uint256[] _shares) public {
function SplitPayment(address[] _payees, uint256[] _shares) public payable {
require(_payees.length == _shares.length);
for (uint256 i = 0; i < _payees.length; i++) {
@ -62,4 +62,9 @@ contract SplitPayment {
payee.transfer(payment);
}
/**
* @dev payable fallback
*/
function () public payable {}
}