Skip to content

Commit

Permalink
Merge pull request #221 from Thetta/dev2enkogu2
Browse files Browse the repository at this point in the history
Dev2enkogu2
  • Loading branch information
AnthonyAkentiev committed Jul 25, 2018
2 parents 1087d7f + 21081ef commit 597e134
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 220 deletions.
9 changes: 5 additions & 4 deletions contracts/moneyflow/MoneflowTable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,9 @@ contract MoneyflowTable is Ownable{//is IWeiReceiver,
function _processFunds(uint _eId, uint _currentFlow, uint _amount) internal {
if(Splitters[_eId].isOpen){
return _processFundsSplitter(_eId, _currentFlow, _amount);
}else if(Expenses[_eId].isOpen){
}else if(Expenses[_eId].isOpen&&_isNeedsMoney(_eId)){
return _processFundsExpense(_eId, _currentFlow, _amount);
}else {
revert();
}
}

Expand All @@ -115,6 +114,7 @@ contract MoneyflowTable is Ownable{//is IWeiReceiver,
require(_amount==_getTotalWeiNeeded(_eId, _currentFlow));
Expenses[_eId].momentReceived = uint(now);
Expenses[_eId].balance += _amount;
Expenses[_eId].isMoneyReceived = true;
}

function getMinWeiNeededForElement(uint _eId)external view returns(uint) {
Expand All @@ -128,7 +128,7 @@ contract MoneyflowTable is Ownable{//is IWeiReceiver,
}else if((Splitters[_eId].isOpen)&&(ElementTypes.UnsortedSplitter==elementsType[_eId])){
return _getMinWeiNeededUnsortedSplitter(_eId);

}else if(Expenses[_eId].isOpen){
}else if(Expenses[_eId].isOpen && _isNeedsMoney(_eId)){
return _getMinWeiNeededExpense(_eId);

}else {
Expand Down Expand Up @@ -239,6 +239,7 @@ contract MoneyflowTable is Ownable{//is IWeiReceiver,
function processFunds(uint _currentFlow) external payable {
require(_currentFlow>=_getMinWeiNeeded(0));
require(msg.value>=_getMinWeiNeeded(0));

return _processFunds(0, _currentFlow, msg.value);
}

Expand Down Expand Up @@ -365,7 +366,7 @@ contract MoneyflowTable is Ownable{//is IWeiReceiver,
}

function withdrawFundsFromElement(uint _eId)external onlyOwner{
require(_isExpense(_eId));
// require(_isExpense(_eId));
Expenses[_eId].output.processFunds.value(Expenses[_eId].balance)(Expenses[_eId].balance);
Expenses[_eId].balance = 0;
}
Expand Down
7 changes: 0 additions & 7 deletions contracts/utils/GenericCaller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ import "zeppelin-solidity/contracts/ownership/Ownable.sol";
*/
contract GenericCaller is DaoClient, Ownable {
using VotingLib for VotingLib.VotingType;
// enum VotingType {
// NoVoting,
// Voting1p1v,
// VotingSimpleToken,
// VotingQuadratic,
// VotingLiquid
// }

event consoleAddr(string comment, address a);
event consoleB32(string comment, bytes32 a);
Expand Down
146 changes: 0 additions & 146 deletions contracts/utils/Manageable.sol

This file was deleted.

54 changes: 0 additions & 54 deletions contracts/utils/Pausable.sol

This file was deleted.

Loading

0 comments on commit 597e134

Please sign in to comment.