Prevent duplicate removal of entries

This commit is contained in:
lash
2023-06-19 12:10:29 +01:00
parent 6674b86ea2
commit 83981d6018
7 changed files with 56 additions and 5 deletions

View File

@@ -98,11 +98,12 @@ contract TokenUniqueSymbolIndex {
if (i < l) {
tokens[i] = tokens[l];
identifierList[i] = identifierList[l];
}
}
registry[tokenIndex[tokens[i]]] = i;
tokens.pop();
identifierList.pop();
registry[tokenIndex[_token]] = 0;
tokenIndex[_token] = bytes32(0);
emit AddressRemoved(_token);
return true;