Skip to content

Commit

Permalink
Fix DMDcoin#50: Allow transfer value for Open type when stacking mult…
Browse files Browse the repository at this point in the history
…iple calldatas
  • Loading branch information
MSalman6 committed Jan 2, 2025
1 parent db44659 commit d7d7a16
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions contracts/DiamondDao.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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]
);
Expand Down

0 comments on commit d7d7a16

Please sign in to comment.