diff --git a/apps/contributor/contracts/Contributor.sol b/apps/contributor/contracts/Contributor.sol index 1c21e58..e9a6271 100644 --- a/apps/contributor/contracts/Contributor.sol +++ b/apps/contributor/contracts/Contributor.sol @@ -54,10 +54,13 @@ contract Contributor is AragonApp { } function updateContributorAccount(uint32 id, address oldAccount, address newAccount) public auth(MANAGE_CONTRIBUTORS_ROLE) { + require(getContributorAddressById(id) == oldAccount, "contributor does not exist"); + contributorIds[oldAccount] = 0; contributorIds[newAccount] = id; contributors[id].account = newAccount; - ContributorAccountUpdated(id, oldAccount, newAccount); + + emit ContributorAccountUpdated(id, oldAccount, newAccount); } function updateContributorProfileHash(uint32 id, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public isInitialized auth(MANAGE_CONTRIBUTORS_ROLE) {