fix #37: remove contribs from IPFS if they are not in the registry.

This commit is contained in:
Richard Ramos 2019-08-05 14:24:07 -04:00
parent 5673915a88
commit 6e6ff4ef33
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,9 @@ export function removeContributor(address) {
const idx = list.findIndex(contributor => contributor.value === address);
list.splice(idx, 1);
const newHash = await saveContributorList(list);
const filteredList = list.filter(contributor => registry.includes(web3.utils.toChecksumAddress(contributor.value)));
const newHash = await saveContributorList(filteredList);
const removeContributor = Meritocracy.methods.removeContributor(index, web3.utils.toHex(newHash));
let gas = await removeContributor.estimateGas({ from: mainAccount });