fix #37: remove contribs from IPFS if they are not in the registry.
This commit is contained in:
parent
5673915a88
commit
6e6ff4ef33
|
@ -40,7 +40,9 @@ export function removeContributor(address) {
|
||||||
const idx = list.findIndex(contributor => contributor.value === address);
|
const idx = list.findIndex(contributor => contributor.value === address);
|
||||||
list.splice(idx, 1);
|
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));
|
const removeContributor = Meritocracy.methods.removeContributor(index, web3.utils.toHex(newHash));
|
||||||
let gas = await removeContributor.estimateGas({ from: mainAccount });
|
let gas = await removeContributor.estimateGas({ from: mainAccount });
|
||||||
|
|
Loading…
Reference in New Issue