Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore expired allowances on execute_increase_allowance and execute_decrease_allowance #913

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

haryunio
Copy link

@haryunio haryunio commented Nov 20, 2024

Current execute_increase_allowance includes expired allowances when calculating the new increased allowance, which might cause the allowance to increase more than intended.

For example, after allowance of 10,000 is expired, increasing 5,000 will cause the allowance to become 15,000.
This should be fixed, so I added simple filtering logic in it.

This issue also mentions same problem
Issue #909


execute_decrease_allowance also has same issue and written in different code style - so applied some changes on it too.

@haryunio haryunio changed the title fix: ignore expired allowances on execute_increase_allowance fix: ignore expired allowances on execute_increase_allowance and execute_decrease_allowance Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant