diff --git a/contracts/DiamondDao.sol b/contracts/DiamondDao.sol index 5b7c566..a06f0d8 100644 --- a/contracts/DiamondDao.sol +++ b/contracts/DiamondDao.sol @@ -372,7 +372,7 @@ contract DiamondDao is IDiamondDao, Initializable, ReentrancyGuardUpgradeable, V proposal.state = ProposalState.Executed; - _executeOperations(proposal.targets, proposal.values, proposal.calldatas, proposal.proposalType); + _executeOperations(proposal.targets, proposal.values, proposal.calldatas); emit ProposalExecuted(msg.sender, proposalId); } @@ -532,10 +532,9 @@ contract DiamondDao is IDiamondDao, Initializable, ReentrancyGuardUpgradeable, V address[] memory targets, uint256[] memory values, bytes[] memory calldatas, - ProposalType proposalType ) private { for (uint256 i = 0; i < targets.length; ++i) { - uint256 execValue = proposalType == ProposalType.Open ? values[i] : 0; + uint256 execValue = calldatas[i].length == 0 ? values[i] : 0; (bool success, bytes memory returndata) = targets[i].call{ value: execValue }( calldatas[i] );