Added Approved and Executed events to Identity contract

This commit is contained in:
Richard Ramos 2018-02-28 14:22:06 -04:00
parent e8cc00be53
commit 47a0434118
1 changed files with 5 additions and 2 deletions

View File

@ -117,6 +117,8 @@ contract Identity is ERC725, ERC735 {
uint8 approvalCount;
uint256 requiredKeyType;
Approved(_id, _approve);
if (trx.to == address(this)) {
requiredKeyType = MANAGEMENT_KEY;
if (keys[managerKeyHash].purpose == MANAGEMENT_KEY) {
@ -128,9 +130,10 @@ contract Identity is ERC725, ERC735 {
approvalCount = _calculateApprovals(actorKeyHash, ACTION_KEY, _approve, trx);
}
}
if (approvalCount >= minimumApprovalsByKeyType[requiredKeyType]) {
success = trx.to.call.value(txx[_id].value)(txx[_id].data);
Executed(_id, trx.to, trx.value, trx.data);
success = trx.to.call.value(trx.value)(trx.data);
}
}