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

refactor: dry-fy functions #683

Merged
merged 1 commit into from
Sep 26, 2023
Merged

refactor: dry-fy functions #683

merged 1 commit into from
Sep 26, 2023

Conversation

andreivladbrg
Copy link
Member

@andreivladbrg andreivladbrg commented Sep 7, 2023

I decided to dry fy withdraw and renounce. I couldn't find/remember why we didn't make this change earlier but I consider now that the code has been improved.

If you have a valid argument against this change I am happy to give up on this PR.

Note: I am aware that we are checking twice the caller in withdrawMaxAndTransfer. Don't think is worth to optimize since this function is very rarely used.

Copy link
Member

@PaulRBerg PaulRBerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've closed PR #682. Can you rebase this PR from 2.1 and reimplement it?

@andreivladbrg andreivladbrg changed the base branch from refactor/disable-sender-to-withdraw to 2.1 September 25, 2023 14:06
@andreivladbrg
Copy link
Member Author

We've closed PR #682. Can you rebase this PR from 2.1 and reimplement it?

Pushed now a commit. Lmk if you like this change

refactor: dry-fy renounce function
Copy link
Member

@PaulRBerg PaulRBerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea. PR looks good!

I also can't remember why we haven't written the functions like this in the first place. Perhaps we just didn't notice the potential optimization.

Happy to merge the PR as is, but as a precaution I suggest running the deep CI with a high number of fuzz runs after merging.

@PaulRBerg PaulRBerg merged commit c206e16 into 2.1 Sep 26, 2023
9 checks passed
@PaulRBerg PaulRBerg deleted the refactor/dry-fy-functions branch September 26, 2023 09:54
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.

2 participants