The remove function worked properly when a removed element was never inserted again in the same transaction. However, sometimes this is not true, like when we use batch router to wrap/unwrap a token and call batch router again to swap with a boosted pool in the same transaction. This PR fixes it. (tests in TransientEnumerableSet are required, there's a ticket for that, #784)
Type of change
[x] Bug fix
[ ] New feature
[ ] Breaking change
[ ] Dependency changes
[ ] Code refactor / cleanup
[ ] Optimization: [ ] gas / [ ] bytecode
[ ] Documentation or wording changes
[ ] Other
Checklist:
[x] The diff is legible and has no extraneous changes
[x] Complex code has been commented, including external interfaces
[ ] Tests have 100% code coverage
[x] The base branch is either main, or there's a description of how to merge
Description
The remove function worked properly when a removed element was never inserted again in the same transaction. However, sometimes this is not true, like when we use batch router to wrap/unwrap a token and call batch router again to swap with a boosted pool in the same transaction. This PR fixes it. (tests in TransientEnumerableSet are required, there's a ticket for that, #784)
Type of change
Checklist:
main
, or there's a description of how to merge