should revert when update contributor account with address(0)

This commit is contained in:
haythem 2019-04-20 14:52:33 +01:00
parent 19ca89e1eb
commit 8927c55661

View File

@ -54,6 +54,7 @@ contract Contributor is AragonApp {
} }
function updateContributorAccount(uint32 id, address oldAccount, address newAccount) public auth(MANAGE_CONTRIBUTORS_ROLE) { function updateContributorAccount(uint32 id, address oldAccount, address newAccount) public auth(MANAGE_CONTRIBUTORS_ROLE) {
require(newAccount != address(0), "invalid new account address");
require(getContributorAddressById(id) == oldAccount, "contributor does not exist"); require(getContributorAddressById(id) == oldAccount, "contributor does not exist");
contributorIds[oldAccount] = 0; contributorIds[oldAccount] = 0;