Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions contracts/SmartIdentity.sol
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,18 @@ contract SmartIdentity {
*/
function acceptEndorsement(bytes32 _attributeHash, bytes32 _endorsementHash) onlyBy(owner) returns(bool) {
var attribute = attributes[_attributeHash];
if (attribute.hash != _attributeHash){
sendEvent(ERROR_EVENT, "Attribute doesn't exist");
revert();
}
var endorsement = attribute.endorsements[_endorsementHash];
if (endorsement.hash != _endorsementHash){
sendEvent(ERROR_EVENT, "Endorsement does not exist");
revert();
}
endorsement.accepted = true;
sendEvent(SIG_CHANGE_EVENT, "Endorsement has been accepted");
return true;
}

/**
Expand Down